apache / arrow

Apache Arrow is the universal columnar format and multi-language toolbox for fast data interchange and in-memory analytics
https://arrow.apache.org/
Apache License 2.0
14.5k stars 3.53k forks source link

[Java] DenseUnionWriter#setPosition fails with NullPointerException #24825

Open asfimport opened 4 years ago

asfimport commented 4 years ago

The writer always iterates through all BaseWriters, and an array of 128 BaseWriters is allocated. So if you do not have 128 typeIds and do not touch all of them, setPosition will give you an exception.

Reporter: David Li / @lidavidm

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

asfimport commented 4 years ago

Liya Fan / @liyafan82: @lidavidm Sorry for the problem. I will provide a patch for it.

asfimport commented 4 years ago

David Li / @lidavidm: No worries! I ran into this while trying to find a way to get the validity buffer to be resized when trying to work around ARROW-8666. But thanks to your suggestion there I should be set for our use case.

asfimport commented 2 years ago

Todd Farmer / @toddfarmer: This issue was last updated over 90 days ago, which may be an indication it is no longer being actively worked. To better reflect the current state, the issue is being unassigned. Please feel free to re-take assignment of the issue if it is being actively worked, or if you plan to start that work soon.