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


##########
java/c/src/main/java/org/apache/arrow/c/BufferImportTypeVisitor.java:
##########
@@ -116,7 +119,7 @@ private ArrowBuf importFixedBytes(ArrowType type, int 
index, long bytesPerSlot)
   }
 
   private ArrowBuf importOffsets(ArrowType type, long bytesPerSlot) {
-    final long capacity = bytesPerSlot * (fieldNode.getLength() + 1);
+    final long capacity = bytesPerSlot * (fieldNode.getLength() + 
arrowArrayOffset + 1);

Review Comment:
   Right, in the C data interface `ArrowArray.Snapshot` only provides us 
`length` and the `offset`, other than that we have no information to determine 
the size of the full buffer. So what we read now has the capacity of `length + 
offset`. Am I missing something here? 



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