datafusion
datafusion copied to clipboard
Rewrite `CommonSubexprEliminate` to avoid copies using TreeNode
WIP -- still has many more copies to remove
Which issue does this PR close?
Part of https://github.com/apache/arrow-datafusion/issues/9637
related to https://github.com/apache/datafusion/issues/9873
Rationale for this change
Let's make planning faster by not copying so much in the optimizer using the new TreeNode API.
What changes are included in this PR?
- See PR subject
Note this pass still leaves a lot to be desired in terms of copying Exprs / making strings but it is much better now. Fixing up the additional copies is tracked with https://github.com/apache/arrow-datafusion/issues/9873
Are these changes tested?
Functional: existing tests Performance: TBD