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

filter_bits under-allocates resulting boolean buffer #6750

Closed
gatesn opened this issue Nov 18, 2024 · 1 comment · Fixed by #6766
Closed

filter_bits under-allocates resulting boolean buffer #6750

gatesn opened this issue Nov 18, 2024 · 1 comment · Fixed by #6766
Labels
arrow Changes to the arrow crate bug good first issue Good for newcomers help wanted

Comments

@gatesn
Copy link

gatesn commented Nov 18, 2024

Describe the bug

The buffer builder is sized as BooleanBufferBuilder::new(bit_util::ceil(predicate.count, 8)), but the new function takes length in bits already, no need for bit_util::ceil:

let byte_capacity = bit_util::ceil(capacity, 8);

let mut builder = BooleanBufferBuilder::new(bit_util::ceil(predicate.count, 8));

Expected behavior
Remove bit_util::cel to avoid under-allocating capacity by 8x

@alamb
Copy link
Contributor

alamb commented Dec 17, 2024

label_issue.py automatically added labels {'arrow'} from #6766

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 bug good first issue Good for newcomers help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants