velox icon indicating copy to clipboard operation
velox copied to clipboard

Support merging encoded Vectors when deserializing

Open kevinwilfong opened this issue 1 year ago • 10 comments

Summary: Exchange has logic to take a vector of pages and deserialize them all into a single RowVector.

This can break when encodings are preserved in the serialized data. Specifically when reading flat data, we used to simply resize the column Vector and deserialize directly into it since that Vector was always flat. That Vector can now be constant or dictionary encoded.

The fix is simply to check if the Vector is flat and call ensureWritable to flatten it if not.

Note that other code paths (deserializing constants, dictionaries, all null columns) already deserialize into a temporary vector, and ensureWritable is called on the output Vector before copying into it (unless this is the first page, in which case the temporary Vector is simply returned).

Differential Revision: D53740784

kevinwilfong avatar Feb 14 '24 01:02 kevinwilfong

Deploy Preview for meta-velox canceled.

Name Link
Latest commit ed348b4e1d587fc57d12c32f87ab2256fe2ec8e8
Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/663d25fce217f9000847867a

netlify[bot] avatar Feb 14 '24 01:02 netlify[bot]

This pull request was exported from Phabricator. Differential Revision: D53740784

facebook-github-bot avatar Feb 14 '24 01:02 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D53740784

facebook-github-bot avatar Feb 21 '24 20:02 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D53740784

facebook-github-bot avatar Feb 21 '24 20:02 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D53740784

facebook-github-bot avatar Apr 01 '24 18:04 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D53740784

facebook-github-bot avatar Apr 01 '24 18:04 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D53740784

facebook-github-bot avatar Apr 02 '24 22:04 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D53740784

facebook-github-bot avatar Apr 02 '24 22:04 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D53740784

facebook-github-bot avatar Apr 03 '24 17:04 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D53740784

facebook-github-bot avatar Apr 03 '24 17:04 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D53740784

facebook-github-bot avatar May 09 '24 19:05 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D53740784

facebook-github-bot avatar May 09 '24 19:05 facebook-github-bot

Addressed in https://github.com/facebookincubator/velox/pull/8526

kevinwilfong avatar May 10 '24 19:05 kevinwilfong