Skip to content

fix(parquet/metadata): handle invalid row-group column indexes - #1125

Merged
zeroshade merged 3 commits into
apache:mainfrom
fallintoplace:fix/parquet-metadata-index-bounds
Aug 12, 2026
Merged

fix(parquet/metadata): handle invalid row-group column indexes#1125
zeroshade merged 3 commits into
apache:mainfrom
fallintoplace:fix/parquet-metadata-index-bounds

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

RowGroupMetaData.ColumnChunk returns an error but currently panics for invalid indexes. The column and offset index location helpers also index the underlying Thrift slice directly.

What changes are included in this PR?

Return an arrow.ErrIndex error from ColumnChunk for invalid indexes, and return false from the location helpers when the index is outside the row-group range.

Are these changes tested?

  • go test ./parquet/metadata

Are there any user-facing changes?

Invalid row-group column indexes are handled as normal errors or missing locations instead of panics.

@fallintoplace
fallintoplace marked this pull request as ready for review August 8, 2026 15:52

@zeroshade zeroshade left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The row-group metadata accessors now handle negative and oversized column indexes without panicking, while preserving valid-index behavior. The new regression coverage exercises all three accessors, and the broader Parquet suite passes. Looks good.

@zeroshade
zeroshade merged commit 0420dc8 into apache:main Aug 12, 2026
23 checks passed
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.

2 participants