FiV0 opened a new issue, #41686:
URL: https://github.com/apache/arrow/issues/41686

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   When copying a struct vector via a transfer pair the nullability of the 
children is not preserved
   ```java
     @Test
     public void testMakeTransferPairPreserveNullability() {
       Field intField = new Field("int", 
FieldType.notNullable(MinorType.INT.getType()), null);
       Field structField = new Field("struct", 
FieldType.notNullable(Struct.INSTANCE), List.of(intField));
       FieldVector vec = structField.createVector(allocator);
   
       TransferPair tp = vec.getTransferPair(new Field("struct", 
FieldType.nullable(Struct.INSTANCE), List.of(intField)), allocator);
       tp.transfer();
   
       FieldVector res = (FieldVector) tp.getTo();
   
       // passes
       assertEquals(intField, vec.getField().getChildren().get(0));
       // fails
       assertEquals(intField, res.getField().getChildren().get(0));
     }
   ```
   results in the failure 
   ```
   Expected :int: Int(32, true) not null
   Actual   :int: Int(32, true)
   ```
   
   ### Component(s)
   
   Java


-- 
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: issues-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to