Stop copying LogicalPlan and Exprs in `ScalarSubqueryToJoin`
Is your feature request related to a problem or challenge?
Part of https://github.com/apache/datafusion/issues/9637
As part of making the planner faster, we are updating the optimizer passes to avoid copying LogicalPlan and Expr (see https://github.com/apache/datafusion/issues/9637)
Describe the solution you'd like
I would like to reduce the amount of copying in this pass (even though it doesn't appear in current profiling)
Describe alternatives you've considered
Apply the model from @Lordworms in https://github.com/apache/datafusion/pull/10166 to this pass 2. Update OptimizerRule::supports_rewrite` to return true
- Update
OptimizerRuleto userewrite - Update the pass itself to not copy the LogicalPlan (ideally using the
TreeNodeAPI) - it is implemented forLogicalPlan(API) andExpr(API)
Other examples: https://github.com/apache/datafusion/pull/10218
Additional context
take
Since this one is a bit tricky and I don't see any draft PRs yet, I am going to take a shot at a PR as well
Well.. I was finishing up going through the Rust book and that took more than expected because other things came up. I'll pick up another ticket, sorry about the delay.
Well.. I was finishing up going through the Rust book and that took more than expected because other things came up. I'll pick up another ticket, sorry about the delay.
No worries -- I think this is a pretty tough first PR to work on. I made a PR to do it here: https://github.com/apache/datafusion/pull/10489