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 06:12:43 UTC

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

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


   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


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