datafusion icon indicating copy to clipboard operation
datafusion copied to clipboard

Rewrite `CommonSubexprEliminate` to avoid copies using TreeNode

Open alamb opened this issue 1 year ago • 0 comments

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?

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

Are there any user-facing changes?

alamb avatar Apr 12 '24 20:04 alamb