-
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
Add ApplyOrder::Recursive
to replace None: Option<ApplyOrder>
and remove nested pattern matching.
#4917
Comments
ApplyOrder::Recursive
to replace None: Option<ApplyOrder>
and avoid nested pattern matching.ApplyOrder::Recursive
to replace None: Option<ApplyOrder>
and remove nested pattern matching.
ApplyOrder::Recursive
to replace None: Option<ApplyOrder>
and remove nested pattern matching.ApplyOrder::Recursive
to replace None: Option<ApplyOrder>
and remove nested pattern matching.
Hi @jackwener, I have one question about the fn optimize_node(
&self,
rule: &Arc<dyn OptimizerRule + Send + Sync>,
plan: &LogicalPlan,
config: &dyn OptimizerConfig,
) -> Result<Option<LogicalPlan>> {
// TODO: future feature: We can do Batch optimize
rule.try_optimize(plan, config)
} Does it only optimize the top level plan node or the whole plan tree? |
And I am currently confused about the implementation difference between |
We can do batch optimize in one plannode rules: Vec<rule>
for rule in rules {
rule.try_optimize(plan, config)
} |
When use |
Currently, we use
None
to represent an optimizing rule to be recursively applied to its children.And we use
Some(TopDown)
andSome(BottomUp)
to represent a rule can be directly applied to the child node.The
None
usage can be directly replaced by introducing a new product typeApplyOrder::Recursive
.This can
This is a follow-up of #4618.
Describe the solution you'd like
Describe alternatives you've considered
We could not do this.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: