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

BooleanBufferBuilder Append Packed #1038

Closed
tustvold opened this issue Dec 13, 2021 · 0 comments · Fixed by #1039
Closed

BooleanBufferBuilder Append Packed #1038

tustvold opened this issue Dec 13, 2021 · 0 comments · Fixed by #1039
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog

Comments

@tustvold
Copy link
Contributor

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

BooleanBufferBuilder currently has no mechanism to append an already packed bitmask, instead requiring bitwise iteration through the mask. This is particularly wasteful where the BooleanBufferBuilder has a length that is a multiple of 8, where a simple memcpy would suffice. I ran into this limitation whilst working on #1037

Describe the solution you'd like

In IOx we have a BitSet implementation that allows directly appending a bitmask - see here. This logic could pretty much just be copied and pasted into arrow.

@tustvold tustvold added the enhancement Any new improvement worthy of a entry in the changelog label Dec 13, 2021
tustvold added a commit to tustvold/arrow-rs that referenced this issue Dec 13, 2021
@alamb alamb added the arrow Changes to the arrow crate label Dec 13, 2021
alamb pushed a commit that referenced this issue Jan 11, 2022
* BooleanBufferBuilder::append_packed (#1038)

* Update docstring

* Add packed_append_range

* Fix capacity

* Use set_bits from transform::util

* Add license

* Format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants