vibhatha commented on code in PR #41732:
URL: https://github.com/apache/arrow/pull/41732#discussion_r1609101270
##########
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 agree, it actually doesn't do any count here, but the new API takes the
vector in as a parameter. How should we tackle that? I can check if we can pass
null there and do a null check and return 0. WDYT?
--
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]