-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: add append_buffer for NullBufferBuilder
#7308
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
Conversation
alamb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @rluvaton
| if buffer.null_count() > 0 { | ||
| self.materialize_if_needed(); | ||
| } | ||
| if let Some(buf) = self.bitmap_builder.as_mut() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there are no nulls in self (so not materalized) and a buffer with nulls is pushed, won't this code ignore those nulls 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, as it's the same code as the slice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this should be covered by the line above that calls materialize_if_needed
| if buffer.null_count() > 0 { | ||
| self.materialize_if_needed(); | ||
| } | ||
| if let Some(buf) = self.bitmap_builder.as_mut() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this should be covered by the line above that calls materialize_if_needed
alamb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which issue does this PR close?
N/A
Rationale for this change
Allow for better performance when concatenating null buffer
What changes are included in this PR?
Added
append_bufferfunction in theNullBufferBuilderthat just call the underlyingBooleanBufferBuilderAre there any user-facing changes?
yes, new API