Skip to content

fix: validate parquet statistics config - #24642

Open
zhangxinyao88 wants to merge 1 commit into
apache:mainfrom
zhangxinyao88:codex/datafusion-17498-statistics-validation
Open

fix: validate parquet statistics config#24642
zhangxinyao88 wants to merge 1 commit into
apache:mainfrom
zhangxinyao88:codex/datafusion-17498-statistics-validation

Conversation

@zhangxinyao88

Copy link
Copy Markdown

Which issue does this PR close?

Rationale for this change

datafusion.execution.parquet.statistics_enabled accepts arbitrary strings. Invalid values silently fall back to the Parquet writer default instead of failing when set.

What changes are included in this PR?

This adds a typed config enum for none, chunk, and page. It validates values at config and protobuf boundaries and passes the validated value to the Parquet writer.

Are these changes tested?

Yes. Unit, protobuf round-trip, and SQL logic tests were added. The full lint and extended workspace test suites pass.

Are there any user-facing changes?

Invalid values now fail at SET time. Valid values remain case-insensitive and are displayed in lowercase.

This changes ParquetOptions.statistics_enabled from Option<String> to Option<DFParquetStatistics>, so the PR may need the api change label.

@github-actions github-actions Bot added sqllogictest SQL Logic Tests (.slt) common Related to common crate proto Related to proto crate datasource Changes to the datasource crate labels Aug 24, 2026
@zhangxinyao88
zhangxinyao88 force-pushed the codex/datafusion-17498-statistics-validation branch from 7192caa to 99c04f2 Compare August 24, 2026 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common Related to common crate datasource Changes to the datasource crate proto Related to proto crate sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant