This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
     new f543cc8a98 [Fix](planner)fix type incompatible after fold constant by 
be on 1.2 (#19825)
f543cc8a98 is described below

commit f543cc8a984ae008e9338a5bd40a562781b12b92
Author: mch_ucchi <[email protected]>
AuthorDate: Sun May 21 09:37:53 2023 +0800

    [Fix](planner)fix type incompatible after fold constant by be on 1.2 
(#19825)
    
    cherry-pick: #19190
---
 .../src/main/java/org/apache/doris/rewrite/FoldConstantsRule.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/rewrite/FoldConstantsRule.java 
b/fe/fe-core/src/main/java/org/apache/doris/rewrite/FoldConstantsRule.java
index cff0754b4e..5a6f140557 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/rewrite/FoldConstantsRule.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/rewrite/FoldConstantsRule.java
@@ -322,7 +322,7 @@ public class FoldConstantsRule implements ExprRewriteRule {
         // ATTN: make sure the child order of expr keep unchanged
         for (int i = 0; i < expr.getChildren().size(); i++) {
             Expr child = expr.getChild(i);
-            if (literalExpr.equals(replaceExpr(child, key, literalExpr))) {
+            if (!(child instanceof LiteralExpr) && 
literalExpr.equals(replaceExpr(child, key, literalExpr))) {
                 literalExpr.setId(child.getId());
                 expr.setChild(i, literalExpr);
                 break;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to