Skip to content

Commit 5a33785

Browse files
committed
review feedback
1 parent af5d613 commit 5a33785

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

java/vector/src/test/java/org/apache/arrow/vector/complex/writer/TestComplexWriter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,16 @@ public void nullableMap() {
8585
MapVector parent = new MapVector("parent", allocator, null);
8686
ComplexWriter writer = new ComplexWriterImpl("root", parent);
8787
MapWriter rootWriter = writer.rootAsMap();
88-
MapWriter mapWriter = rootWriter.map("map");
89-
BigIntWriter nested = mapWriter.bigInt("nested");
9088
for (int i = 0; i < COUNT; i++) {
89+
rootWriter.start();
9190
if (i % 2 == 0) {
91+
MapWriter mapWriter = rootWriter.map("map");
9292
mapWriter.setPosition(i);
9393
mapWriter.start();
94-
nested.writeBigInt(i);
94+
mapWriter.bigInt("nested").writeBigInt(i);
9595
mapWriter.end();
9696
}
97+
rootWriter.end();
9798
}
9899
writer.setValueCount(COUNT);
99100
MapReader rootReader = new SingleMapReaderImpl(parent).reader("root");
@@ -109,7 +110,6 @@ public void nullableMap() {
109110
assertNull("index is not set: " + i, map.readObject());
110111
}
111112
}
112-
113113
parent.close();
114114
}
115115

0 commit comments

Comments
 (0)