vibhatha commented on code in PR #40340:
URL: https://github.com/apache/arrow/pull/40340#discussion_r1565570301


##########
java/vector/src/test/java/org/apache/arrow/vector/testing/ValueVectorDataPopulator.java:
##########
@@ -586,6 +588,31 @@ public static void setVector(VarCharVector vector, 
byte[]... values) {
     vector.setValueCount(length);
   }
 
+  public static void setVector(VariableWidthFieldVector vector, byte[]... 
values) {
+    final int length = values.length;
+    vector.allocateNewSafe();
+    for (int i = 0; i < length; i++) {
+      if (values[i] != null) {
+        vector.set(i, values[i]);
+      }
+    }
+    vector.setValueCount(length);
+  }
+
+  /**
+   * Populate values for ViewVarCharVector.
+   */
+  public static void setVector(ViewVarCharVector vector, byte[]... values) {
+    final int length = values.length;
+    vector.allocateNewSafe();
+    for (int i = 0; i < length; i++) {
+      if (values[i] != null) {
+        vector.set(i, values[i]);
+      }
+    }
+    vector.setValueCount(length);
+  }

Review Comment:
   You're correct, this is wrong. Something I missed down the line when the 
common interface was introduced. 



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