-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Labels
Type: bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Milestone
Description
A UnionMapWriter will null out the entire map struct entry instead of setting the value to null:
childWriter.value().fixedSizeBinary().writeNull();
Actually hits NullableStructWriter#writeNull
whereas UnionMapWriter should override writeNull
and do a switch on the mode (though I'm not certain if null keys are valid).
EDIT:
Actually, the issue is that fixedSizeBinary
needs to be overriden! Very frustrating, but this call is not overridden and is instead invoking UnionListWriter#fixedSizeBinary()
:
@Override
public FixedSizeBinaryWriter fixedSizeBinary() {
return this;
}
The real impl needs to override like so:
@Override
public FixedSizeBinaryWriter fixedSizeBinary() {
switch (mode) {
case KEY:
return entryWriter.fixedSizeBinary(MapVector.KEY_NAME);
case VALUE:
return entryWriter.fixedSizeBinary(MapVector.VALUE_NAME);
default:
return this;
}
}
Metadata
Metadata
Assignees
Labels
Type: bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed