You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "xxlaykxx (via GitHub)" <gi...@apache.org> on 2023/06/29 12:55:54 UTC

[GitHub] [arrow] xxlaykxx commented on a diff in pull request #36351: GH-36375: [Java] Added creating MapWriter in ComplexWriter.

xxlaykxx commented on code in PR #36351:
URL: https://github.com/apache/arrow/pull/36351#discussion_r1246583107


##########
java/vector/src/test/java/org/apache/arrow/vector/complex/writer/TestComplexWriter.java:
##########
@@ -362,125 +355,6 @@ public void listDecimalType() {
     }
   }
 
-  @Test
-  public void listTimeStampMilliTZType() {
-    try (ListVector listVector = ListVector.empty("list", allocator)) {
-      listVector.allocateNew();
-      UnionListWriter listWriter = new UnionListWriter(listVector);
-      for (int i = 0; i < COUNT; i++) {
-        listWriter.startList();
-        for (int j = 0; j < i % 7; j++) {
-          if (j % 2 == 0) {
-            listWriter.writeNull();
-          } else {
-            TimeStampMilliTZHolder holder = new TimeStampMilliTZHolder();
-            holder.timezone = "FakeTimeZone";
-            holder.value = j;
-            listWriter.timeStampMilliTZ().write(holder);
-          }
-        }
-        listWriter.endList();
-      }
-      listWriter.setValueCount(COUNT);
-      UnionListReader listReader = new UnionListReader(listVector);
-      for (int i = 0; i < COUNT; i++) {
-        listReader.setPosition(i);
-        for (int j = 0; j < i % 7; j++) {
-          listReader.next();
-          if (j % 2 == 0) {
-            assertFalse("index is set: " + j, listReader.reader().isSet());
-          } else {
-            NullableTimeStampMilliTZHolder actual = new NullableTimeStampMilliTZHolder();
-            listReader.reader().read(actual);
-            assertEquals(j, actual.value);
-            assertEquals("FakeTimeZone", actual.timezone);
-          }
-        }
-      }
-    }
-  }
-
-  @Test
-  public void listDurationType() {
-    try (ListVector listVector = ListVector.empty("list", allocator)) {
-      listVector.allocateNew();
-      UnionListWriter listWriter = new UnionListWriter(listVector);
-      for (int i = 0; i < COUNT; i++) {
-        listWriter.startList();
-        for (int j = 0; j < i % 7; j++) {
-          if (j % 2 == 0) {
-            listWriter.writeNull();
-          } else {
-            DurationHolder holder = new DurationHolder();
-            holder.unit = TimeUnit.MICROSECOND;
-            holder.value = j;
-            listWriter.duration().write(holder);
-          }
-        }
-        listWriter.endList();
-      }
-      listWriter.setValueCount(COUNT);
-      UnionListReader listReader = new UnionListReader(listVector);
-      for (int i = 0; i < COUNT; i++) {
-        listReader.setPosition(i);
-        for (int j = 0; j < i % 7; j++) {
-          listReader.next();
-          if (j % 2 == 0) {
-            assertFalse("index is set: " + j, listReader.reader().isSet());
-          } else {
-            NullableDurationHolder actual = new NullableDurationHolder();
-            listReader.reader().read(actual);
-            assertEquals(TimeUnit.MICROSECOND, actual.unit);
-            assertEquals(j, actual.value);
-          }
-        }
-      }
-    }
-  }
-
-  @Test
-  public void listFixedSizeBinaryType() throws Exception {

Review Comment:
   my mistake  - reverted 



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

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org