Skip to content

fix(parquet/metadata): reject negative row-group indices in Subset - #1055

Open
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/parquet-metadata-subset-negative
Open

fix(parquet/metadata): reject negative row-group indices in Subset#1055
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:fix/parquet-metadata-subset-negative

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

FileMetaData.Subset checked only the upper bound. Negative indices passed validation and later caused a runtime bounds panic despite the method having an error return.

What changes are included in this PR?

Reject indices below zero as well as indices at or above the row-group count.

Are these changes tested?

Yes. Regression cases cover an isolated negative index and mixed valid/invalid input.

go test ./parquet/metadata

Are there any user-facing changes?

Negative selections now return an error instead of panicking.

@fallintoplace
fallintoplace requested a review from zeroshade as a code owner July 29, 2026 16:54
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