-
Notifications
You must be signed in to change notification settings - Fork 841
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
Update GenericBinaryBuilder
to use buffer builders directly.
#2117
Conversation
Signed-off-by: remzi <13716567376yh@gmail.com>
Signed-off-by: remzi <13716567376yh@gmail.com>
Signed-off-by: remzi <13716567376yh@gmail.com>
Signed-off-by: remzi <13716567376yh@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #2117 +/- ##
==========================================
+ Coverage 83.76% 83.78% +0.01%
==========================================
Files 225 225
Lines 59457 59485 +28
==========================================
+ Hits 49806 49839 +33
+ Misses 9651 9646 -5
|
} | ||
|
||
/// Append a null value to the array. | ||
#[inline] | ||
pub fn append_null(&mut self) { | ||
self.append(false) | ||
self.null_buffer_builder.append(false); |
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.
An optimisation we use elsewhere is to lazily create the null builder on first null
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.
Currently, This optimization is only used on primitive builder and boolean builder.
We could do a follow-up to use it on all builders.
Benchmark runs are scheduled for baseline = fd38664 and contender = 1805b30. 1805b30 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Which issue does this PR close?
Closes #2104.
Rationale for this change
Don't build binary array from list builder to avoid bugs and extra memory occupation.
What changes are included in this PR?
GenericBinaryBuilder
append_byte
andappend
. (append_value
andappend_null
can achieve all functionalities)Are there any user-facing changes?
Yes, remove 2 pub methods
append_byte
andappend
.