askalt commented on PR #20009:
URL: https://github.com/apache/datafusion/pull/20009#issuecomment-4037992673

   @adriangb Could you please help to advance the review of the patch?
   
   I am noticed that there is a new API that allows to visit expressions in the 
read-only manner. It seems this API can be easily expressed generically using 
this patch, i.e. we can replace it with a helper like:
   
   ```rust
       fn apply_expressions(
           plan: &dyn ExecutionPlan,
           f: &mut dyn FnMut(&dyn PhysicalExpr) -> Result<TreeNodeRecursion>,
       ) -> Result<TreeNodeRecursion> {
           let mut tnr = TreeNodeRecursion::Continue;
           for expr in &self.expressions {
               tnr = tnr.visit_sibling(|| f(expr.as_ref()))?;
           }
           Ok(tnr)
       }
   ```
   
   What do you think?
   
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to