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

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   I cannot create a StructVector with a dense-union child - it fails with the 
following stack trace:
   
   ```
   java.lang.UnsupportedOperationException: Unknown type: DENSEUNION
        at 
org.apache.arrow.vector.complex.impl.NullableStructWriter.<init>(NullableStructWriter.java:258)
        at 
org.apache.arrow.vector.complex.StructVector.<init>(StructVector.java:69)
        at xtdb.vector.StructVectorWriterTest.struct with DUV 
child(StructVectorWriterTest.kt:101)
   ```
   
   Test code is essentially:
   
   ```java
           Field child = new Field("child", FieldType.notNullable(new 
ArrowType.Union(UnionMode.Dense, null)), emptyList());
           Field struct = new Field("foo", 
FieldType.notNullable(ArrowType.Struct.INSTANCE), List.of(child));
   
           try(RootAllocator allocator = new RootAllocator();
               StructVector structVec = new StructVector(struct, allocator, 
null)) {
               
               System.out.println("working!");
           }
   ```
   
   I suspect it's a case of adding `DENSEUNION` to the `switch` in the 
`NullableStructWriter` constructor, with a similar implementation to the sparse 
`UNION`?
   
   Cheers,
   
   James
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to