Skip to content

Commit 1480f12

Browse files
committed
MINOR: [Java] Make StructVector.reallocValidityBuffer protected
[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 77e62d3 commit 1480f12

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)