lidavidm commented on code in PR #886:
URL: https://github.com/apache/arrow-java/pull/886#discussion_r2471753799


##########
vector/src/main/java/org/apache/arrow/vector/validate/ValidateVectorBufferVisitor.java:
##########
@@ -158,7 +158,15 @@ public Void visit(BaseLargeVariableWidthVector vector, 
Void value) {
 
   @Override
   public Void visit(BaseVariableWidthViewVector vector, Void value) {
-    throw new UnsupportedOperationException("View vectors are not supported.");
+    final int valueCount = vector.getValueCount();
+    validateOrThrow(
+        vector.getValueCount() >= 0,
+        "Vector valueCount %s is negative.",
+        vector.getValueCapacity());

Review Comment:
   Roughly yes but I would prefer adding a `TypeLayout.isVariableBuffer` 
instead of hardcoding a type check



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