Repository navigation
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?
Closes #24708.
Rationale for this change
Large
INfilters can prevent DataFusion from skipping Parquet row groups and pages, even when their statistics show they cannot contain any of the requested values. This is especially costly when the values are clustered in a narrow range.What changes are included in this PR?
When compact pruning isn't available for a positive
INlist, DataFusion now tries to compute the minimum and maximum literal values in one pass. It skips containers whose statistics don't overlap that range. If both bounds are equal, it uses an equality check. The range is used only for pruning; the originalINfilter still determines which rows match.The fallback ignores
NULLliterals and is not used for NULL-only lists, non-literal expressions, NaNs, or unsupported types.NOT INis unchanged, andmax_in_list_size = 0still disablesIN-list pruning.Benchmarks
Local Criterion comparison against
mainusingrelease-nonlto, 1,024 list values, and 4,096 disjointInt64containers. Lower container counts mean more pruning.ININNOT ININThe fallback pruned 99.5% of containers for the clustered list. The scattered list shows the tradeoff: about 31 µs more to build the predicate and 37 µs more to evaluate it, with only three containers pruned. These timings measure pruning, not end-to-end query runtime.
What is the testing strategy for this PR?
Added unit tests in
pruning_predicate.rsfor range pruning, equal bounds, NULLs, NaNs,NOT IN, the opt-out, and inverted statistics bounds. Added Parquet row-group and page-index tests instring_in_list_pruning.rsforInt64, signed zero, and fixed-size binary, plus SQL coverage inparquet_statistics.sltandinformation_schema.slt.Verification on
7455d99:datafusion-pruning: 121 passed.datafusion-datasource-parquet: 315 unit tests and 5 doc tests passed.parquet_integration: 265 passed.parquet_statisticsandinformation_schemasqllogictests: 5 passed.Are there any user-facing changes?
Eligible large
INfilters can now skip Parquet row groups and pages using min/max statistics without changing query results. Updated the documentation fordatafusion.execution.parquet.max_in_list_sizeand regenerated the configuration reference.