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():
@OverridepublicFixedSizeBinaryWriterfixedSizeBinary() {
returnthis;
}The real impl needs to override like so:
@OverridepublicFixedSizeBinaryWriterfixedSizeBinary() {
switch (mode) {
caseKEY:
returnentryWriter.fixedSizeBinary(MapVector.KEY_NAME);
caseVALUE:
returnentryWriter.fixedSizeBinary(MapVector.VALUE_NAME);
default:
returnthis;
}
}
A UnionMapWriter will null out the entire map struct entry instead of setting the value to null:
Actually hits
NullableStructWriter#writeNullwhereas UnionMapWriter should overridewriteNulland do a switch on the mode (though I'm not certain if null keys are valid).EDIT:
Actually, the issue is that
fixedSizeBinaryneeds to be overriden! Very frustrating, but this call is not overridden and is instead invokingUnionListWriter#fixedSizeBinary():The real impl needs to override like so: