Skip to content

MINOR: Change access modifier of StructVector reallocValidityBuffer - #1195

Open
lriggs wants to merge 1 commit into
apache:mainfrom
lriggs:modifyAccess
Open

lriggs wants to merge 1 commit into
apache:mainfrom
lriggs:modifyAccess

Conversation

@lriggs

@lriggs lriggs commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

What's Changed

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.

…vate 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.
@lriggs lriggs changed the title [MINOR] Change access modifier of StructVector reallocValidityBuffer MINOR: Change access modifier of StructVector reallocValidityBuffer Jun 26, 2026
@github-actions

Copy link
Copy Markdown

Thank you for opening a pull request!

Please label the PR with one or more of:

  • bug-fix
  • chore
  • dependencies
  • documentation
  • enhancement

Also, add the 'breaking-change' label if appropriate.

See CONTRIBUTING.md for details.

@lidavidm

Copy link
Copy Markdown
Member

What's the use case for subclassing StructVector?

@lriggs

lriggs commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

What's the use case for subclassing StructVector?

We have a helper class which wraps StructVector to provide more fine grained control. Maybe @selvaganesang can provide some more details.

@selvaganesang

Copy link
Copy Markdown

Provides a mechanism for independent reallocation of embedded vectors to prevent over-expansion of variable-width vectors when the parent struct vector is reallocated. This only mimics the similar concept from ListVector.

@lidavidm

Copy link
Copy Markdown
Member

I suppose, why can't the improvements themselves be upstreamed?

@dmitry-chirkov-dremio

Copy link
Copy Markdown

@lriggs @selvaganesang please re-engage here. I'm enumerating all the goodies we have tried by fire in production in order to upstream them all. This is one of them.

@selvaganesang what are the improvements? All on the consumer end? Or more changes in arrow-java?

@jbonofre

Copy link
Copy Markdown
Member

I will review and work on this one after 20.0.0 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants