igor-suhorukov commented on code in PR #13906:
URL: https://github.com/apache/arrow/pull/13906#discussion_r949146357


##########
java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/JdbcParameterBinderTest.java:
##########
@@ -385,6 +388,106 @@ void decimal256() throws SQLException {
         Arrays.asList(new BigDecimal("120.429"), new BigDecimal("-10590.123"), 
new BigDecimal("0.000")));
   }
 
+  @Test
+  void listOfDouble() throws SQLException {
+    TriConsumer<ListVector, Integer, Double[]> setValue = (listVector, index, 
values) -> {
+      org.apache.arrow.vector.complex.impl.UnionListWriter writer = 
listVector.getWriter();
+      writer.setPosition(index);
+      writer.startList();
+      Arrays.stream(values).forEach(doubleValue -> 
writer.float8().writeFloat8(doubleValue));
+      writer.endList();
+      listVector.setLastSet(index);
+    };
+    List<Double[]> values = Arrays.asList(new Double[]{0.0, Math.PI}, new 
Double[]{1.1, -352346.2, 2355.6},
+                                          new Double[]{-1024.3});
+    testListType(new ArrowType.FloatingPoint(FloatingPointPrecision.DOUBLE), 
setValue, ListVector::setNull, values);
+  }
+
+  @Test
+  void listOfInt64() throws SQLException {
+    TriConsumer<ListVector, Integer, Long[]> setValue = (listVector, index, 
values) -> {
+      org.apache.arrow.vector.complex.impl.UnionListWriter writer = 
listVector.getWriter();
+      writer.setPosition(index);
+      writer.startList();
+      Arrays.stream(values).forEach(longValue -> 
writer.bigInt().writeBigInt(longValue));
+      writer.endList();
+      listVector.setLastSet(index);
+    };
+    List<Long[]> values = Arrays.asList(new Long[]{1L, 2L, 3L}, new Long[]{4L, 
5L},
+            new Long[]{512L, 1024L, 2048L, 4096L});
+    testListType((ArrowType) new ArrowType.Int(64, true), setValue, 
ListVector::setNull, values);
+  }
+
+  @Test
+  void listOfInt32() throws SQLException {
+    TriConsumer<ListVector, Integer, Integer[]> setValue = (listVector, index, 
values) -> {
+      org.apache.arrow.vector.complex.impl.UnionListWriter writer = 
listVector.getWriter();
+      writer.setPosition(index);
+      writer.startList();
+      Arrays.stream(values).forEach(integerValue -> 
writer.integer().writeInt(integerValue));
+      writer.endList();
+      listVector.setLastSet(index);
+    };
+    List<Integer[]> values = Arrays.asList(new Integer[]{1, 2, 3}, new 
Integer[]{4, 5},
+            new Integer[]{512, 1024, 2048, 4096});
+    testListType((ArrowType) new ArrowType.Int(32, true), setValue, 
ListVector::setNull, values);
+  }
+
+  @Test
+  void listOfInt32WithEmptyList() throws SQLException {

Review Comment:
   Sure, thanks for advice



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to