From d0b0273f08bbb63e806d3a779cbc8378f46540fd Mon Sep 17 00:00:00 2001 From: "logan.riggs@gmail.com" Date: Fri, 26 Jun 2026 19:31:18 +0000 Subject: [PATCH] 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 5e5bb7fc21..21ea9c6f05 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 @@ -529,7 +529,7 @@ public void reAlloc() { super.reAlloc(); } - private void reallocValidityBuffer() { + protected void reallocValidityBuffer() { final int currentBufferCapacity = checkedCastToInt(validityBuffer.capacity()); long newAllocationSize = getNewAllocationSize(currentBufferCapacity);