Skip to content

fix(parquet/metadata): return schema initialization errors - #1056

Open
fallintoplace wants to merge 2 commits into
apache:mainfrom
fallintoplace:fix/parquet-metadata-schema-errors
Open

fix(parquet/metadata): return schema initialization errors#1056
fallintoplace wants to merge 2 commits into
apache:mainfrom
fallintoplace:fix/parquet-metadata-schema-errors

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

NewFileMetaData discarded the error from initSchema and immediately initialized column orders. When malformed metadata could not produce a schema, this could dereference the unset schema and panic.

What changes are included in this PR?

Return the schema initialization error before touching column orders.

Are these changes tested?

Yes. A regression test serializes invalid schema metadata and verifies an error with no result.

go test ./parquet/metadata -run TestNewFileMetaDataReturnsSchemaErrors

Are there any user-facing changes?

Malformed metadata now returns its schema error instead of potentially panicking.

@fallintoplace
fallintoplace requested a review from zeroshade as a code owner July 29, 2026 16:54
@fallintoplace fallintoplace changed the title fix(parquet/metadata): propagate schema initialization errors fix(parquet/metadata): return schema initialization errors Jul 29, 2026
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