Parquet: Add tests for disabling statistics on multiple columns - #18096
Open
LouisDeconinck wants to merge 2 commits into
Open
LouisDeconinck wants to merge 2 commits into
LouisDeconinck wants to merge 2 commits into
Conversation
Generated-by: Devin
yangshangqing95
approved these changes
Sep 14, 2026
Author
|
Done — the three new test methods now drop the |
Author
|
Done — dropped the |
Author
|
Thanks! Dropped the |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds test coverage in
TestParquetfor disabling Parquet column statistics viawrite.parquet.stats-enabled.column.<COLUMN_NAME>on multiple columns at once, the scenario reported in #15347.The multi-column disable path already works correctly on
main(as confirmed in the issue discussion and in the earlier attempts), so this PR adds regression coverage only — no production code changes.A shared
writeAndAssertColumnStatisticshelper writes records with the given table properties and asserts per-column statistics presence in the Parquet footer. All of the tests share one constant schema and express expectations as a column name to statistics-presence map, per the review feedback on #17365:testColumnStatisticsDefault— no per-column properties; all columns write statisticstestColumnStatisticsEnabled— existing test, refactored onto the shared schema and helper (one column enabled, one disabled, one unconfigured)testMultipleColumnsStatisticsDisabled— two columns disabled; both omit statistics while the unconfigured third column still writes them (the reported Disabling statistics across multiple columns #15347 scenario)testAllColumnsStatisticsDisabled— statistics disabled on every column in the schemaFixes #15347
Test plan
./gradlew :iceberg-parquet:test --tests 'org.apache.iceberg.parquet.TestParquet'— 26 tests, all pass./gradlew :iceberg-parquet:spotlessCheck— cleanAI Disclosure