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

Move BooleanBufferBuilder and NullBufferBuilder to arrow_buffer #4338

Merged
merged 2 commits into from
Jun 2, 2023

Conversation

tustvold
Copy link
Contributor

@tustvold tustvold commented Jun 1, 2023

Which issue does this PR close?

Closes #.

Rationale for this change

Manually creating a NullBuffer is cumbersome, moving the builders into arrow_buffer will allow defining more ergonomic constructors for these types

What changes are included in this PR?

Are there any user-facing changes?

It removes the deprecated combine_option_bitmap

@tustvold tustvold added the api-change Changes to the arrow API label Jun 1, 2023
@github-actions github-actions bot added the arrow Changes to the arrow crate label Jun 1, 2023
@@ -128,10 +127,15 @@ impl NullBufferBuilder {

/// Builds the null buffer and resets the builder.
/// Returns `None` if the builder only contains `true`s.
pub fn finish(&mut self) -> Option<Buffer> {
let buf = self.bitmap_builder.take().map(Into::into);
pub fn finish(&mut self) -> Option<NullBuffer> {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this was previously crate-private I took the opportunity to change the signature before it becomes public and changing would be a breaking change

@viirya
Copy link
Member

viirya commented Jun 1, 2023

I don't see api change except for moving the two builders, is it right?

@tustvold
Copy link
Contributor Author

tustvold commented Jun 1, 2023

I removed the deprecated combine_option_bitmap as part of the move (as it depended on ArrayData)

@tustvold tustvold merged commit a121e09 into apache:master Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-change Changes to the arrow API arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants