3535import org .apache .arrow .flight .Ticket ;
3636import org .apache .arrow .memory .BufferAllocator ;
3737import org .apache .arrow .memory .RootAllocator ;
38+ import org .apache .arrow .vector .BigIntVector ;
3839import org .apache .arrow .vector .VarCharVector ;
3940import org .apache .arrow .vector .VectorSchemaRoot ;
4041import org .apache .arrow .vector .types .pojo .ArrowType ;
@@ -94,8 +95,9 @@ public static VectorSchemaRoot generateVectorSchemaRoot(final int fieldCount, fi
9495 public static VectorSchemaRoot generateVectorSchemaRootWithNull () {
9596 Field normalField = new Field ("normalField" , FieldType .nullable (new ArrowType .Utf8 ()), null );
9697 Field nullField = new Field ("nullField" , FieldType .nullable (new ArrowType .Utf8 ()), null );
98+ Field nullField1 = new Field ("nullField1" , FieldType .nullable (new ArrowType .Int (64 , true )), null );
9799
98- Schema schema = new Schema (List .of (normalField , nullField ));
100+ Schema schema = new Schema (List .of (normalField , nullField , nullField1 ));
99101 VectorSchemaRoot vectorSchemaRoot = VectorSchemaRoot .create (schema , new RootAllocator (Long .MAX_VALUE ));
100102
101103 VarCharVector vector = (VarCharVector ) vectorSchemaRoot .getVector (normalField );
@@ -106,6 +108,10 @@ public static VectorSchemaRoot generateVectorSchemaRootWithNull() {
106108 vector .allocateNew (1 );
107109 vector .setNull (0 );
108110
111+ BigIntVector intVector = (BigIntVector ) vectorSchemaRoot .getVector (nullField1 );
112+ intVector .allocateNew (1 );
113+ intVector .setNull (0 );
114+
109115 vectorSchemaRoot .setRowCount (1 );
110116 return vectorSchemaRoot ;
111117 }
0 commit comments