jackwener commented on code in PR #6595:
URL: https://github.com/apache/arrow-datafusion/pull/6595#discussion_r1227618012


##########
datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs:
##########
@@ -206,7 +206,16 @@ impl<'a> TreeNodeRewriter for ConstEvaluator<'a> {
 
     fn mutate(&mut self, expr: Expr) -> Result<Expr> {
         match self.can_evaluate.pop() {
-            Some(true) => Ok(Expr::Literal(self.evaluate_to_scalar(expr)?)),
+            Some(true) => {
+                // After simplifying the expression, data_type may change, so 
we need to cast it.

Review Comment:
   Correct it



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