ump45nose commented on code in PR #1379:
URL: https://github.com/apache/arrow-java/pull/1379#discussion_r4493113343
##########
vector/src/main/java/org/apache/arrow/vector/types/Types.java:
##########
@@ -164,7 +164,7 @@ public enum MinorType {
@Override
public FieldVector getNewVector(
Field field, BufferAllocator allocator, CallBack
schemaChangeCallback) {
- return new NullVector(field.getName());
+ return new NullVector(field);
Review Comment:
Good catch, thanks. In 8fb9a80 `NullVector.getTransferPair(String, ...)` now
builds the target with the source `FieldType`, and `getTransferPair(Field,
...)` uses the given `Field`, so `slice()` keeps nullability and metadata. I
added your scenario as
`TestVectorSchemaRootAppender#testAppendSliceWithNonNullableNullVector`, plus
`TestSplitAndTransfer#testNullVectorTransferPairKeepsField` for the three
transfer-pair entry points. Both fail without the change, and the full vector
module tests pass locally.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]