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

ARROW-10745: [Rust] Directly allocate padding bytes in filter context #8779

Closed
wants to merge 2 commits into from

Conversation

Dandandan
Copy link
Contributor

A thing I noticed while going through some code.

When creating aMutableBuffer here only filter_bytes.len() are being allocated, but the capacity can afterwards being increased when adding bytes using extend_from_slice.

This changes it to allocate those bytes directly.

@github-actions
Copy link

Copy link
Member

@jorgecarleitao jorgecarleitao left a comment

Choose a reason for hiding this comment

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

LGTM. Well spotted.

@nevi-me nevi-me closed this in a6dd52d Nov 27, 2020
GeorgeAp pushed a commit to sirensolutions/arrow that referenced this pull request Jun 7, 2021
A thing I noticed while going through some code.

When creating a`MutableBuffer` here only `filter_bytes.len()` are being allocated, but the capacity can afterwards being increased when adding bytes using `extend_from_slice`.

This changes it to allocate those bytes directly.

Closes apache#8779 from Dandandan/allocate_padding

Authored-by: Heres, Daniel <danielheres@gmail.com>
Signed-off-by: Neville Dipale <nevilledips@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants