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:
[email protected]


Reply via email to