smiklos commented on code in PR #7257:
URL: https://github.com/apache/arrow-datafusion/pull/7257#discussion_r1289918773
##########
datafusion/optimizer/src/push_down_projection.rs:
##########
@@ -337,7 +338,7 @@ impl OptimizerRule for PushDownProjection {
)?);
let new_filter =
child_plan.with_new_inputs(&[new_projection])?;
- generate_plan!(projection_is_empty, plan, new_filter)
+ plan.with_new_inputs(&[new_filter])?
Review Comment:
in this branch projection_is_empty is false so new_filter was returned as
is. However that means it becomes a filter plan with a different schema. so
this way we keep the original plan and change it's inputs
##########
datafusion/optimizer/src/push_down_projection.rs:
##########
@@ -337,7 +338,7 @@ impl OptimizerRule for PushDownProjection {
)?);
let new_filter =
child_plan.with_new_inputs(&[new_projection])?;
- generate_plan!(projection_is_empty, plan, new_filter)
+ plan.with_new_inputs(&[new_filter])?
Review Comment:
in this branch projection_is_empty is false so new_filter was returned as
is. However that means it becomes a filter plan with a different schema. so
this way we keep the original plan and change its inputs
--
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]