This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-1.1-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.1-lts by this push:
new ad3baa8f38 [Fix](planner)fix type incompatible after fold constant by
be on 1.1 (#19827)
ad3baa8f38 is described below
commit ad3baa8f38eed904ccf7b7bdc1d80a7b70df7d5d
Author: mch_ucchi <[email protected]>
AuthorDate: Fri May 19 14:58:42 2023 +0800
[Fix](planner)fix type incompatible after fold constant by be on 1.1
(#19827)
after fold constant by be, the original expression will be replaced
directly by the constant. we all cast if type is not compatible.
---
.../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 6f9bfa8042..59ee8014c4 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
@@ -319,7 +319,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]