viirya commented on code in PR #40043:
URL: https://github.com/apache/arrow/pull/40043#discussion_r1486530907
##########
java/vector/src/main/java/org/apache/arrow/vector/BaseLargeVariableWidthVector.java:
##########
@@ -73,7 +73,8 @@ public BaseLargeVariableWidthVector(Field field, final
BufferAllocator allocator
lastValueCapacity = INITIAL_VALUE_ALLOCATION - 1;
valueCount = 0;
lastSet = -1;
- offsetBuffer = allocator.getEmpty();
+ // According to Arrow spec, the offsets buffer contains length + 1 elements
+ allocateOffsetBuffer(OFFSET_WIDTH);
Review Comment:
Hmm, maybe I should update the export code of C data interface here? I think
previously the empty offset buffer works like a lazy offset buffer in var-wide
arrays. They are expanded to valid format (length + 1) once the array has
elements.
--
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]