You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/01/20 09:04:12 UTC

[GitHub] [arrow] bogdanghit commented on pull request #9187: ARROW-11223: [Java] Fix: BaseVariableWidthVector/BaseLargeVariableWidthVector setNull() and getBufferSizeFor() trigger offset buffer overflow

bogdanghit commented on pull request #9187:
URL: https://github.com/apache/arrow/pull/9187#issuecomment-763451111


   > Thanks for reporting the problem and thanks for the discussion.
   > IMO, the behavior is by design, and the problem can be solved by calling the `setValueCount` method after calling `setNull`.
   > Before calling `setValueCount`, the vector is in an undefined state, and can have some unexpected behaviors.
   > 
   > To use the vectors properly, we need to respect its life-cycle. Details can be found in https://arrow.apache.org/docs/java/vector.html#vector-life-cycle
   
   @liyafan82 wouldn't `setValueCount` close the batch? In a streaming scenario, in which you fill up batches up to a given size, you need to check the buffer size without actually closing the batch.


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

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