Skip to content

fix(parquet/variant): validate compound value bounds - #1126

Draft
fallintoplace wants to merge 3 commits into
apache:mainfrom
fallintoplace:fix/variant-compound-validation
Draft

fix(parquet/variant): validate compound value bounds#1126
fallintoplace wants to merge 3 commits into
apache:mainfrom
fallintoplace:fix/variant-compound-validation

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

NewWithMetadata accepts truncated arrays and objects because compound values are validated lazily. Accessing one of those values can then panic on a short offset table or an out-of-range child value.

What changes are included in this PR?

Validate compound headers, offset tables, monotonic offsets, and nested value boundaries before returning a value while keeping the existing compound accessors lazy.

Are these changes tested?

  • go test ./parquet/variant

Are there any user-facing changes?

Malformed compound variant values now return an error during construction instead of panicking during access.

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.

1 participant