-
Notifications
You must be signed in to change notification settings - Fork 29
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] DenseUnionWriter#setPosition fails with NullPointerException #399
Comments
Liya Fan / @liyafan82: |
Todd Farmer / @toddfarmer: |
This issue still persists. Notably: @Override
public void setPosition(int index) {
super.setPosition(index);
for (BaseWriter writer : writers) {
writer.setPosition(index);
}
} But, writers is an array of length 128 and each writer is lazily initialized - in that every writer is The result is that it is impossible to write Lists of Unions using this library. Noting that @Override
public void startList() {
vector.startNewValue(idx());
writer.setPosition(vector.getOffsetBuffer().getInt((idx() + 1L) * OFFSET_WIDTH));
listStarted = true;
} |
@jbonofre @kou I think there are a lot of little bugs like this that Nate has been reporting or re-raising...maybe let's organize them with a label/project and see if we can tackle them over time? At least I don't want to lose track of the and Nate has been doing us a favor showing where we've overlooked things 😅 |
I think it's OK to re-add step by step this kind of issues. On some other ASF projects, we started with the issues specific for the first release (after a move from a repo to another). Then, we can add the "old" issues. I think it's ok 😄 (a bit of work/script). |
I'm just going to start labeling with help-wanted (and good-first-issue if appropriate) |
It sounds good. I will help on that front 😄 |
+1 |
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.
The text was updated successfully, but these errors were encountered: