mingmwang commented on code in PR #3855:
URL: https://github.com/apache/arrow-datafusion/pull/3855#discussion_r998963496


##########
datafusion/core/src/physical_optimizer/utils.rs:
##########
@@ -45,3 +45,74 @@ pub fn optimize_children(
         with_new_children_if_necessary(plan, children)
     }
 }
+
+/// Apply transform `F` to the plan's children, the transform `F` might have a 
direction(Preorder or Postorder)
+fn map_children<F>(

Review Comment:
   Yes, those are duplications, those utils are applied to `Arc<dyn 
ExecutionPlan> `and the others applied to `Arc<dyn PhysicalExpr>`.   Maybe I 
should define a common `TreeVisitor` struct to hold those methods, but I don't 
how to make it work for both Arc<dyn ExecutionPlan> and Arc<dyn PhysicalExpr> 
in Rust.
   
   Need help, any suggestion here ?



-- 
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]

Reply via email to