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

[JAVA]: Fix reset() and allocateNew() in Nullable Value Vectors template #17487

Closed
asfimport opened this issue Sep 5, 2017 · 1 comment
Closed
Assignees
Milestone

Comments

@asfimport
Copy link

(1)

allocateNew() in NullableValueVectors allocates extra memory for the validity vector of fixed-width vectors. Instead of doing bits.allocateNew(valueCount + 1), we should simply do bits.allocateNew(valueCount).

AFAIK, the only case where we need an additional valueCount is for the offsetVector and we already do that. Additional valueCount for the validity vector is not needed.

(2)

reset() method should call reset() on the underlying value vector as well to re-initialize the state (allocation monitor, reader index etc) and zero out the buffers. Right now we just reset the validity vector.

Reporter: Siddharth Teotia / @siddharthteotia
Assignee: Siddharth Teotia / @siddharthteotia

Note: This issue was originally created as ARROW-1467. Please see the migration documentation for further details.

@asfimport
Copy link
Author

Wes McKinney / @wesm:
Issue resolved by pull request 1052
#1052

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants