Closed
Description
Is your feature request related to a problem or challenge?
The common subexpression elimination pass copies many Expr
s around. You can see this performance impact this has by looking at the screenshot from #9637 (comment)
While we will fix the copying plan problem in #9637 I think there is more work to be done in the common sub expression code itself, which copies a significant number of Exprs and Strings around
Describe the solution you'd like
Figure out how to avoid clone
ing Expr
s in the https://github.com/apache/arrow-datafusion/blob/main/datafusion/optimizer/src/common_subexpr_eliminate.rs
- The
Expr
s themselves - Avoid creating Strings for
Identifier
We should see a significant improvement in the sql_planner benchmarks:
cargo bench --bench sql_planner
Describe alternatives you've considered
No response
Additional context
I noticed this while reviewing #9871