alamb commented on code in PR #15735:
URL: https://github.com/apache/datafusion/pull/15735#discussion_r2047681019


##########
datafusion/optimizer/src/simplify_expressions/simplify_exprs.rs:
##########
@@ -123,10 +123,14 @@ impl SimplifyExpressions {
         let name_preserver = NamePreserver::new(&plan);
         let mut rewrite_expr = |expr: Expr| {
             let name = name_preserver.save(&expr);
+            let original = expr.clone();

Review Comment:
   the extra clone here worries me. 
   
   It seems like maybe a better approach would be to change 
`Simplifier::simplify` to return `Transformed`?



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