Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,9 @@ private VectorSchemaRoot generateAllTypesVector(BufferAllocator allocator) {
// DenseUnion
List<Field> childFields = new ArrayList<>();
childFields.add(
new Field("int-child", new FieldType(true, new ArrowType.Int(32, true), null, null), null));
new Field("int-child", FieldType.notNullable(new ArrowType.Int(32, true)), null));
Field structField =
new Field(
"struct", new FieldType(true, ArrowType.Struct.INSTANCE, null, null), childFields);
new Field("struct", FieldType.nullable(ArrowType.Struct.INSTANCE), childFields);
Field[] fields =
new Field[] {
Field.nullablePrimitive("null", ArrowType.Null.INSTANCE),
Expand Down Expand Up @@ -238,7 +237,11 @@ private VectorSchemaRoot generateAllTypesVector(BufferAllocator allocator) {
largeListWriter.integer().writeInt(1);
largeListWriter.endList();

((StructVector) root.getVector("struct")).getChild("int-child", IntVector.class).set(1, 1);
IntVector intChildVector =
((StructVector) root.getVector("struct")).getChild("int-child", IntVector.class);
// Non-nullable vector, make sure to fill all slots
intChildVector.set(0, 0);
intChildVector.set(1, 1);
return root;
}

Expand Down
Loading