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-13147: [Java] Respect the rounding policy when allocating vector buffers #10576

Closed
wants to merge 1 commit into from

Conversation

liyafan82
Copy link
Contributor

According to the current implementation, the default "next power of two" rounding policy is assumed when allocating buffers for a vector.

In particular, for fixed width vectors, this policy is applied for the validity and data buffers, and for variable width vectors, this policy is applied for the validity and offset buffers.

However, this default policy is not always used for the allocator. When an alternative policy is in use, the buffers allocated assuming the default policy will have inappropriate capacities, which may lead to waste of memory spaces.

@github-actions
Copy link

Copy link
Contributor

@emkornfield emkornfield left a comment

Choose a reason for hiding this comment

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

LGTM. Feel free to merge, or I'll do so when I'm at the right computer.

@liyafan82
Copy link
Contributor Author

LGTM. Feel free to merge, or I'll do so when I'm at the right computer.

@emkornfield Thanks a lot for your feedback. Merging...

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.

2 participants