From 1480f12c4e68d8be1e8bacdf4b6dd70dfdfee63b Mon Sep 17 00:00:00 2001 From: "selva.govindarajan" Date: Thu, 29 Jan 2026 09:16:28 -0800 Subject: [PATCH] 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. --- .../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);