Avoid clone for LogicalPlan during optimizer passes
Which issue does this PR close?
Closes #9637.
Rationale for this change
What changes are included in this PR?
Boxed plan #9763 is included too.
Are these changes tested?
Are there any user-facing changes?
TODO
- benchmark (This PR)
- rewrite inputs for other complex plans e.g. DDL, extensions
Hi @jayzhan211 -- I only just now saw this PR. I had some time this morning and didn't see this PR, so I was playing around with a slightly different (and more incremental approach) in https://github.com/apache/arrow-datafusion/pull/9780 -- basically the idea is to support rewriting in place using the TreeNode API
It seems to be promising so far.
It will take a few PRs to get there, but I think it is showing promise.
Thank you for your contribution. Unfortunately, this pull request is stale because it has been open 60 days with no activity. Please remove the stale label or comment or this will be closed in 7 days.