alamb opened a new pull request #9278:
URL: https://github.com/apache/arrow/pull/9278


   ## Problem:
   * There are several places in the DataFusion codebase where a walk of an 
Expression tree is needed
   * The logic of how to walk the tree is replicated
   * Adding new expression types often require many mechanically different but 
semantically the same changes in many places where no special treatment of such 
types is needed
   
   This PR introduces a `ExpressionVisitor` trait and the `Expr::accept` 
function to consolidate this walking of the expression tree. It does not intend 
to change any functionality. 
   
   If folks like this pattern, I have ideas for a similar type of trait 
`ExpressionRewriter` which can be used to rewrite expressions (much like 
`clone_with_replacement`) as a subsquent PR. I think this was mentioned by 
@Dandandan  in the [Rust 
roadmap](https://docs.google.com/document/d/1qspsOM_dknOxJKdGvKbC1aoVoO0M3i6x1CIo58mmN2Y/edit#heading=h.kstb571j5g5j)
   
   
   cc @jorgecarleitao @Dandandan and @andygrove 


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to