jarohen opened a new issue, #830:
URL: https://github.com/apache/arrow-java/issues/830

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   added test case to TestStructVector:
   
   ```java
   
     @Test
     public void testStructVectorTransferPairWithNullType() {
       Field uuidField = new Field("null", 
FieldType.nullable(ArrowType.Null.INSTANCE), null);
       Field structField =
               new Field("struct", FieldType.nullable(new ArrowType.Struct()), 
List.of(uuidField));
   
       try(StructVector s1 = (StructVector) 
structField.createVector(allocator)) {
           NullVector nullVector =
                   s1.addOrGet("null", 
FieldType.nullable(ArrowType.Null.INSTANCE), NullVector.class);
           s1.setValueCount(1);
           nullVector.setNull(0);
           s1.setIndexDefined(0);
   
           TransferPair tp = s1.getTransferPair(structField, allocator);
           try (StructVector toVector = (StructVector) tp.getTo()) {
               assertEquals(s1.getField(), toVector.getField());
           }
       }
     }
   ```
   
   got this:
   
   ```
   java.lang.UnsupportedOperationException: Unknown type: NULL
        at 
org.apache.arrow.vector.complex.impl.NullableStructWriter.<init>(NullableStructWriter.java:279)
        at 
org.apache.arrow.vector.complex.StructVector.<init>(StructVector.java:74)
        at 
org.apache.arrow.vector.complex.StructVector.getTransferPair(StructVector.java:261)
        at 
org.apache.arrow.vector.TestStructVector.testStructVectorTransferPairWithNullType(TestStructVector.java:389)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
   ```
   
   expected: similar result to `testStructVectorTransferPairWithExtensionType`
   
   Cheers!
   
   James


-- 
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]

Reply via email to