-
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
Move PruningPredicate to physical-optimizer crate #12037
Conversation
//! Physical expressions. They are kept in their own crate to avoid physical | ||
//! expressions depending on logical expressions. | ||
//! | ||
//! Note this crate is not intended to have substantial logic itself, but rather |
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 added some additional explanation about this crate (partly as a justification about why it was ok to depend on in the physical optimizer)
@@ -23,3 +23,5 @@ mod optimizer; | |||
pub mod output_requirements; | |||
|
|||
pub use optimizer::PhysicalOptimizerRule; | |||
|
|||
pub mod pruning; |
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 was just to make the use
statements less ugly
@@ -615,7 +611,8 @@ impl PruningPredicate { | |||
is_always_true(&self.predicate_expr) && self.literal_guarantees.is_empty() | |||
} | |||
|
|||
pub(crate) fn required_columns(&self) -> &RequiredColumns { | |||
/// Return the columns that are required to evaluate the pruning predicate | |||
pub fn required_columns(&self) -> &RequiredColumns { |
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.
as it is in a different crate now this function needs to become pub, which I think is reasonable as it is part of the API
Likewise the change to make RequiredColumns
pub
@@ -29,7 +29,6 @@ pub mod join_selection; | |||
pub mod limited_distinct_aggregation; | |||
pub mod optimizer; | |||
pub mod projection_pushdown; | |||
pub mod pruning; |
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.
there is a
pub use datafusion_physical_optimizer::*;
a few lines down which adds an alias to the pruning
module in its new home
519f0f3
to
5a5fa91
Compare
I need to update the tests |
Which issue does this PR close?
Part of #11502
Rationale for this change
We are trying to break up pieces the
datafusion
crate into smaller pieces for faster compile time and better modularity. Part of this is the physical optimizerWhat changes are included in this PR?
Move
PruningPredicate
into the physical optimizer crateAre these changes tested?
Yes, by existing CI
Are there any user-facing changes?
No, there are backwards compatible
pub use
that mean no user change are required