viirya commented on code in PR #40043:
URL: https://github.com/apache/arrow/pull/40043#discussion_r1488756790


##########
java/vector/src/main/java/org/apache/arrow/vector/BaseVariableWidthVector.java:
##########
@@ -476,11 +507,12 @@ private void allocateBytes(final long valueBufferSize, 
final int valueCount) {
   }
 
   /* allocate offset buffer */
-  private void allocateOffsetBuffer(final long size) {
+  private ArrowBuf allocateOffsetBuffer(final long size) {

Review Comment:
   To move this forward instead of arguing continuously. I would like confirm 
that if the following approach is acceptable to you.
   
   1. Not change current initial offset buffer when creating vector, i.e., they 
are empty as usual.
   2. Allocate one value offset buffer when exporting vector and replace the 
existing (empty) offset buffer.
   3. For the places in var-size vectors which have the assumption about 
initial offset buffer capacity (zero), changing it or throwing some error (as 
these places are going to re-allocate offset buffer).
   
   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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to