liyafan82 commented on a change in pull request #8605:
URL: https://github.com/apache/arrow/pull/8605#discussion_r520405424



##########
File path: 
java/vector/src/test/java/org/apache/arrow/vector/TestFixedSizeListVector.java
##########
@@ -402,6 +402,34 @@ public void testSplitAndTransfer() throws Exception {
     }
   }
 
+  @Test
+  public void testZeroWidthVector() throws Exception {
+    try (final FixedSizeListVector vector1 = 
FixedSizeListVector.empty("vector", 0, allocator)) {
+
+      UnionFixedSizeListWriter writer1 = vector1.getWriter();
+      writer1.allocate();
+
+      int[] values1 = new int[] {};
+      int[] values2 = new int[] {};
+      int[] values3 = new int[] {};
+
+      //set some values
+      writeListVector(writer1, values1);
+      writeListVector(writer1, values2);
+      writeListVector(writer1, values3);
+      writer1.setValueCount(3);

Review comment:
       Maybe we can add a case to insert null into the vector?




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


Reply via email to