Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add option to negate bits written to ByteOutputStream #12050

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kevinwilfong
Copy link
Contributor

Summary:
In PrestoSerializer we write the null bits to a ByteOutputStream. Presto's serialization format inverts the null
flags from what Velox uses. This change adds an option to ByteOutputStream to do that negation on flush,
rather than requiring the user to negate them when calling append. This makes it easier to write ranges of null
bits without an additional copy, and reduces the level of mental gymnastics needed to reason about the null
flags in the serializer. (It's analogous to the option ByteOutputStream already has to reverse the order
of bits within a byte, again because of Presto's serialization format for null flags).

Differential Revision: D67994045

Summary:
In PrestoSerializer we write the null bits to a ByteOutputStream. Presto's serialization format inverts the null
flags from what Velox uses. This change adds an option to ByteOutputStream to do that negation on flush,
rather than requiring the user to negate them when calling append.  This makes it easier to write ranges of null
bits without an additional copy, and reduces the level of mental gymnastics needed to reason about the null 
flags in the serializer. (It's analogous to the option ByteOutputStream already has to reverse the order
of bits within a byte, again because of Presto's serialization format for null flags).

Differential Revision: D67994045
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 9, 2025
@facebook-github-bot
Copy link
Contributor

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

Copy link

netlify bot commented Jan 9, 2025

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 48de32e
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/678053270e1f4b0008b65386

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants