You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/01/29 02:58:43 UTC

[GitHub] [arrow] siddharthteotia commented on a change in pull request #9151: ARROW-11173: [Java] Add map type in complex reader / writer

siddharthteotia commented on a change in pull request #9151:
URL: https://github.com/apache/arrow/pull/9151#discussion_r566548084



##########
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>>

Review comment:
       What would help (especially the people who will edit this test in the future) is to have a description in comments of how the map will look like after you have added whatever data you want to use for test. I had used this in several places in TestValueVector, TestListVector etc and it helps a lot with visualizing and debugging.




----------------------------------------------------------------
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:
users@infra.apache.org