Skip to content

Commit ab6e97c

Browse files
committed
ARROW-XXXX: [Java] Make StructVector.reallocValidityBuffer protected
Changes the access modifier of `reallocValidityBuffer` from package-private to protected. This allows subclasses to reallocate the validity buffer independently of the struct elements. Previously, expanding the validity buffer required a full vector reallocation, which could cause an `OversizedAllocationException` if the child data vectors were already near their capacity.
1 parent 193c85a commit ab6e97c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

vector/src/main/java/org/apache/arrow/vector/complex/StructVector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ public void reAlloc() {
528528
super.reAlloc();
529529
}
530530

531-
private void reallocValidityBuffer() {
531+
protected void reallocValidityBuffer() {
532532
final int currentBufferCapacity = checkedCastToInt(validityBuffer.capacity());
533533
long newAllocationSize = getNewAllocationSize(currentBufferCapacity);
534534

0 commit comments

Comments
 (0)