liyafan82 commented on pull request #9187: URL: https://github.com/apache/arrow/pull/9187#issuecomment-764197687
> @liyafan82, does it imply that `setValueCount` should always be called before `vector.getBufferSizeFor` to have the guaranteed result without failure? It would be great if we can explicitly document this, or remove such requirement. Generally, `setValueCount` should be called before `vector.getBufferSizeFor` . Otherwise, the vector may be in an undefined state, with unexpected behaviors. It would be difficult to remove such a requirement, as it would be expensive to maintain the vector in a consisent state for all the time. It is a good idea to revise the documentation, as it seems to be causing the confusion. ---------------------------------------------------------------- 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]
