jackwener commented on code in PR #5337:
URL: https://github.com/apache/arrow-datafusion/pull/5337#discussion_r1117884836
##########
datafusion/optimizer/src/push_down_filter.rs:
##########
@@ -511,25 +511,20 @@ impl OptimizerRule for PushDownFilter {
"push_down_filter"
}
+ fn apply_order(&self) -> Option<ApplyOrder> {
+ Some(ApplyOrder::TopDown)
+ }
+
fn try_optimize(
&self,
plan: &LogicalPlan,
- config: &dyn OptimizerConfig,
+ _config: &dyn OptimizerConfig,
) -> Result<Option<LogicalPlan>> {
let filter = match plan {
LogicalPlan::Filter(filter) => filter,
// we also need to pushdown filter in Join.
- LogicalPlan::Join(join) => {
- let optimized_plan = push_down_join(plan, join, None)?;
- return match optimized_plan {
- Some(optimized_plan) => Ok(Some(
- optimize_children(self, &optimized_plan, config)?
- .unwrap_or(optimized_plan),
- )),
- None => optimize_children(self, plan, config),
- };
- }
- _ => return optimize_children(self, plan, config),
Review Comment:
@HaoYang670 Here remove a risk recursion.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]