From ab6e97cee6cd2c27cc65009e9ca8ee087a67fb27 Mon Sep 17 00:00:00 2001 From: "selva.govindarajan" Date: Wed, 28 Jan 2026 21:30:36 -0800 Subject: [PATCH] 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. --- .../main/java/org/apache/arrow/vector/complex/StructVector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/java/org/apache/arrow/vector/complex/StructVector.java b/vector/src/main/java/org/apache/arrow/vector/complex/StructVector.java index ca5f572034..1d122c5630 100644 --- a/vector/src/main/java/org/apache/arrow/vector/complex/StructVector.java +++ b/vector/src/main/java/org/apache/arrow/vector/complex/StructVector.java @@ -528,7 +528,7 @@ public void reAlloc() { super.reAlloc(); } - private void reallocValidityBuffer() { + protected void reallocValidityBuffer() { final int currentBufferCapacity = checkedCastToInt(validityBuffer.capacity()); long newAllocationSize = getNewAllocationSize(currentBufferCapacity);