nbruno commented on a change in pull request #9151:
URL: https://github.com/apache/arrow/pull/9151#discussion_r582505891
##########
File path: java/vector/src/main/codegen/templates/UnionVector.java
##########
@@ -647,6 +673,8 @@ public ValueVector getVectorByType(int typeId, ArrowType
arrowType) {
return getStruct();
case LIST:
return getList();
+ case MAP:
+ return getMap();
Review comment:
I believe this should've been `getMap(name, arrowType)`. I updated the
PR with a unit test for `UnionVector`.
##########
File path: java/vector/src/test/java/org/apache/arrow/vector/TestMapVector.java
##########
@@ -624,6 +625,423 @@ public void testMapWithListValue() throws Exception {
}
}
+ @Test
+ public void testMapWithMapValue() throws Exception {
+ try (MapVector mapVector = MapVector.empty("sourceVector", allocator,
false)) {
+
+ UnionMapWriter mapWriter = mapVector.getWriter();
+ MapWriter valueWriter;
+
+ // we are essentially writing Map<Long, Map<Long, Long>>
+
+ mapWriter.setPosition(0);
+ mapWriter.startMap();
+
+ mapWriter.startEntry();
Review comment:
Done
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]