WeichenXu123 commented on pull request #9187:
URL: https://github.com/apache/arrow/pull/9187#issuecomment-763544300
@liyafan82 And, the "by designed" code, your said,
```
while (index >= getValidityBufferValueCapacity()) {
reallocValidityAndOffsetBuffers();
}
```
It doesn't looks like a "by design" code but looks like a "negligence". It
doesn't save memory. Because you still need to scale up both of validity and
offset buffer.
If the original code is "by design" and want to save memory in this case, it
should be written like:
```
while (index >= getValidityBufferValueCapacity()) {
reallocValidityBuffer();
}
```
----------------------------------------------------------------
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]