-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Refactor: move RowGroupPredicateBuilder into its own module, rename to PruningPredicateBuilder #365
Conversation
Codecov Report
@@ Coverage Diff @@
## master #365 +/- ##
==========================================
+ Coverage 75.86% 75.89% +0.02%
==========================================
Files 143 144 +1
Lines 23758 23771 +13
==========================================
+ Hits 18025 18040 +15
+ Misses 5733 5731 -2
Continue to review full report at Codecov.
|
FYI @yordan-pavlov and @returnString |
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 have not read it in detail but I assume it is just a code movement and rename and therefore 👍
let logical_predicate_expr = | ||
build_predicate_expression(expr, &schema, &mut stat_column_req)?; | ||
// println!( | ||
// "PruningPredicateBuilder::try_new, logical_predicate_expr: {:?}", |
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.
Those println comments could be removed?
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.
(they were there in the original code but I think would be better to remove them)
self.scalar_expr | ||
} | ||
|
||
// fn column_name(&self) -> &String { |
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.
Could be removed
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.
in 688dde4
} | ||
} | ||
|
||
// fn column_expr(&self) -> &Expr { |
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.
Could be removed
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.
in 688dde4
fn is_stat_column_missing(&self, statistics_type: StatisticsType) -> bool { | ||
self.stat_column_req | ||
.iter() | ||
.filter(|(c, t, _f)| c == &self.column_name && t == &statistics_type) |
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.
This code could use .any
instead of filter + count.
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.
In 2c6a23b
I also think this is looking good. I think we might clean things up a bit while touching the code, I added some suggestions. |
Cleaned per @Dandandan 's suggestions |
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 like it, great use of the physical optimizer
Which issue does this PR close?
Part of #363
Rationale for this change
As explained on #363 the high level idea goal is to make the parquet row group pruning logic generic to any types of min/max statistics (not just parquet metadata)
What changes are included in this PR?
No changes in functionality are intended
The PR contains two commits to help reviewers
Are there any user-facing changes?
The
pub struct RowGroupPredicateBuilder
struct was renamed