-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[parquet] Avoid read parquet index when there is no filter pushdown. #6317
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Ted-Jiang -- this is looking good. I think we should remove the unwrap
to avoid panics but otherwise I think this is looking good
@@ -222,6 +222,11 @@ impl PagePruningPredicate { | |||
file_metrics.page_index_rows_filtered.add(total_skip); | |||
Ok(Some(final_selection)) | |||
} | |||
|
|||
/// Returns the number of filters in the [`PagePruningPredicate`] | |||
pub fn filter_number(&self) -> usize { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the use of this code, I think using is_empty()
rather than len()
would be clearer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think need the number of filters in future 😆
.unwrap(); | ||
|
||
// Without filter will not read pageIndex. | ||
assert!(bytes_scanned_with_filter > bytes_scanned_without_filter); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Ted-Jiang -- this is looking good. I think we should remove the unwrap
to avoid panics but otherwise I think this is looking good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great -- thank you @Ted-Jiang
Which issue does this PR close?
Closes #6315
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?