josiahyan commented on a change in pull request #8214:
URL: https://github.com/apache/arrow/pull/8214#discussion_r494710549
##########
File path: java/vector/src/main/java/org/apache/arrow/vector/BitVector.java
##########
@@ -126,7 +126,12 @@ public void setInitialCapacity(int valueCount) {
*/
@Override
public int getValueCapacity() {
- return capAtMaxInt(validityBuffer.capacity() * 8);
+ return actualValueCapacity;
+ }
+
+ @Override
+ protected void refreshValueCapacity() {
+ actualValueCapacity = capAtMaxInt(validityBuffer.capacity() * 8);
Review comment:
I guess you need to transfer the buffers or something with an
intentionally broken source (if possible) to trigger this.
----------------------------------------------------------------
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]