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


##########
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:
   Is the intent of this change to avoid changing the existing offset buffer, 
and only change it for the exported version? Then I must ask
   
   (1) why? If we're allocating the buffer, we may as well use it for the 
vector as well.
   (2) is this safe in terms of leaking memory? since apparently nothing will 
hold on to the buffer after allocating it above



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