peter-toth commented on code in PR #10396:
URL: https://github.com/apache/datafusion/pull/10396#discussion_r1591488825


##########
datafusion/optimizer/src/common_subexpr_eliminate.rs:
##########
@@ -319,19 +325,13 @@ impl CommonSubexprEliminate {
             Aggregate::try_new(Arc::new(new_input), new_group_expr, 
new_aggr_expr)
                 .map(LogicalPlan::Aggregate)
         } else {
-            let mut agg_exprs = vec![];
-
-            for id in affected_id {
-                match expr_set.get(&id) {
-                    Some((expr, _, _, symbol)) => {
-                        // todo: check `nullable`
-                        agg_exprs.push(expr.clone().alias(symbol.as_str()));

Review Comment:
   this clone is eliminated in the 3rd commit



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to