Skip to content

Can't create a StructVector with a NullVector child #690

@jarohen

Description

@jarohen

Describe the bug, including details regarding any error messages, version, and platform.

repro (against 18.1.0):

    @Test
    public void testStructWithNullVectorChild() {
        var field = new Field(
                "foo", FieldType.notNullable(ArrowType.Struct.INSTANCE),
                List.of(
                        new Field("null", FieldType.nullable(ArrowType.Null.INSTANCE), List.of())
                )
        );
        try (var al = new RootAllocator()) {
            try (var vec = new StructVector(field, al, null)) {
                // boom
            }
        }
    }

error:

Unknown type: NULL
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 xtdb.api.XtdbHelloWorldTest.testStructWithNullVectorChild(XtdbHelloWorldTest.java:58)

Context here is that I'm actually calling vec.getTransferPair(field, al) on an existing vector, but the above is a more minimal repro

Cheers folks!

James

Metadata

Metadata

Assignees

Labels

Type: bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions