andygrove commented on code in PR #2357:
URL: https://github.com/apache/arrow-datafusion/pull/2357#discussion_r862049831


##########
datafusion/core/src/optimizer/simplify_expressions.rs:
##########
@@ -400,9 +402,9 @@ impl<'a> ConstEvaluator<'a> {
     }
 
     /// Internal helper to evaluates an Expr
-    pub(crate) fn evaluate_to_scalar(&self, expr: Expr) -> Result<ScalarValue> 
{
+    pub(crate) fn evaluate_to_scalar(&self, expr: &Expr) -> 
Result<ScalarValue> {
         if let Expr::Literal(s) = expr {
-            return Ok(s);
+            return Ok(s.clone());

Review Comment:
   @alamb I reverted this change and actually completely changed direction on 
this PR ... please see the updated PR description.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to