Repository navigation
Avoid dictionary promotion for plain Parquet pages - #26973
Open
Rich-T-kid wants to merge 1 commit into
Open
Rich-T-kid wants to merge 1 commit into
Rich-T-kid wants to merge 1 commit into
Conversation
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.
Which issue does this PR close?
Rationale for this change
enable_rle_to_dictionarypromotes a column when any row group has a dictionary page. If a writer later falls back to plain pages, schema adaptation rebuilds dictionaries per batch. ClickBench Q23 spends most of its projection time in that cast.What changes are included in this PR?
Dictionary promotion now requires page encoding statistics showing that every data page is dictionary encoded. Missing evidence keeps the plain type. When files disagree, directory schema inference also keeps the plain type instead of promoting the other files.
The option documentation is updated to describe the narrower behavior.
Results
A controlled ClickBench run compared
55a2794bwith4b73f22a. Both use DataFusion #26816, Arrow #12008, dictionary reads, and a 32 GiB limit; this PR's policy is the only code difference.Twenty-four queries improved, three regressed, and sixteen were unchanged in the primary summary. Q28 was the only material regression at 1.12x.
What is the testing strategy for this PR?
Unit tests cover dictionary-only, mixed, missing-statistics, and missing-dictionary-page metadata, plus mixed-file schema normalization.
Validated with:
cargo test -p datafusion-datasource-parquet --lib(296 tests)cargo test --test sqllogictests -- information_schemacargo clippy --workspace --all-targets --all-features -- -D warningscargo fmt --all -- --check./dev/update_config_docs.shAre there any user-facing changes?
With
enable_rle_to_dictionary=true, columns containing plain fallback pages, or lacking page encoding statistics, remain their plain string or binary type.