You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jackwener (via GitHub)" <gi...@apache.org> on 2023/06/13 06:55:51 UTC

[GitHub] [arrow-datafusion] jackwener commented on a diff in pull request #6595: fix: from_plan shouldn't use original schema

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: github-unsubscribe@arrow.apache.org

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