apache / apache/arrow-java

Can't create a StructVector with a NullVector child

未關閉
#690 1 則留言 0 個 reaction 已指派 1 人 已被 @jbonofre 認領 在 GitHub 檢視
Type: bug
主要語言
Java
星號
94
分支
152
平均合併
3 天 16 小時
30 天內合併 PR
11

描述

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

repro (against 18.1.0):

```java
@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.(NullableStructWriter.java:279)
at org.apache.arrow.vector.complex.StructVector.(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

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。