lidavidm commented on code in PR #41732:
URL: https://github.com/apache/arrow/pull/41732#discussion_r1609103828


##########
java/vector/src/main/java/org/apache/arrow/vector/VectorLoader.java:
##########
@@ -95,10 +100,16 @@ private void loadBuffers(
       Field field,
       Iterator<ArrowBuf> buffers,
       Iterator<ArrowFieldNode> nodes,
-      CompressionCodec codec) {
+      CompressionCodec codec,
+      Iterator<Long> variadicBufferCounts) {
     checkArgument(nodes.hasNext(), "no more field nodes for field %s and 
vector %s", field, vector);
     ArrowFieldNode fieldNode = nodes.next();
-    int bufferLayoutCount = TypeLayout.getTypeBufferCount(field.getType());
+    // variadicBufferLayoutCount will be 0 for vectors of type except 
BaseVariableWidthViewVector
+    long variadicBufferLayoutCount = 0;
+    if (variadicBufferCounts != null) {
+      variadicBufferLayoutCount = variadicBufferCounts.next();
+    }
+    int bufferLayoutCount = (int) (variadicBufferLayoutCount + 
TypeLayout.getTypeBufferCount(field.getType(), vector));

Review Comment:
   I'm saying we might not need the new API



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