Skip to content

Skip re-pruning based on partition values and file level stats if there are no dynamic filters #16424

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
4 changes: 2 additions & 2 deletions datafusion/core/tests/parquet/row_group_pruning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ macro_rules! int_tests {
.with_query(&format!("SELECT * FROM t where i{} in (100)", $bits))
.with_expected_errors(Some(0))
.with_matched_by_stats(Some(0))
.with_pruned_by_stats(Some(0))
.with_pruned_by_stats(Some(4))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is basically reverting the changes made in #16447 because we are now not doing file level pruning if there are only static filters.

@alamb maybe this is an argument to still do the file level pruning even if there are no dynamic filters. I guess this pruning is not happening anywhere else. One could argue it should happen right after statistics are collected, in the TableProvider, but that doesn't seem to be the case and maybe it's better to just let it happen in ParquetOpener (or we could move this pruning up to the DataSourceExec or something so it works for all sources) so that TableProvider complexity is kept to a minimum.

.with_matched_by_bloom_filter(Some(0))
.with_pruned_by_bloom_filter(Some(0))
.with_expected_rows(0)
Expand Down Expand Up @@ -1316,7 +1316,7 @@ async fn test_row_group_with_null_values() {
.with_query("SELECT * FROM t WHERE \"i32\" > 7")
.with_expected_errors(Some(0))
.with_matched_by_stats(Some(0))
.with_pruned_by_stats(Some(0))
.with_pruned_by_stats(Some(3))
.with_expected_rows(0)
.with_matched_by_bloom_filter(Some(0))
.with_pruned_by_bloom_filter(Some(0))
Expand Down
Loading
Loading