mingmwang commented on PR #3972: URL: https://github.com/apache/arrow-datafusion/pull/3972#issuecomment-1292303371
> > I also implemented similar things to PhysicalExprs. I think we can have a unified Trait. > > https://github.com/apache/arrow-datafusion/blob/b705574cbb334fd07aab355437a56aa118e578f9/datafusion/physical-expr/src/physical_expr.rs > > Yes, Essentially it's the same thing. > > The main difference is that one is a plan tree and the other is an expression book tree The Trait `TreeNodeRewritable` is quite general, It does not have any assumption on the Tree Node type. Implementations just need to implement one method `map_children()`. And It also support rewriting using Visitors which can get ride of some clone() and can do more things in one tree walk(For example collect necessary context information and do rewriting, it's hybird of PostOrder and PreOder Tree traversal) -- 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]
