This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new e3dbbed47c3 [fix](Nereids) query failed when fold constant on be
failed (#25982)
e3dbbed47c3 is described below
commit e3dbbed47c31440519671be0bade3438c1c72664
Author: morrySnow <[email protected]>
AuthorDate: Fri Oct 27 14:22:08 2023 +0800
[fix](Nereids) query failed when fold constant on be failed (#25982)
we translate expression to legacy one when do fold constant on BE.
some times, we generate invalid expression that cannot be tranlsated.
So, we should catch translate exception to avoid query failed.
---
.../nereids/rules/expression/rules/FoldConstantRuleOnBE.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/FoldConstantRuleOnBE.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/FoldConstantRuleOnBE.java
index 689bfc442bf..681fa4b56cd 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/FoldConstantRuleOnBE.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/FoldConstantRuleOnBE.java
@@ -134,7 +134,13 @@ public class FoldConstantRuleOnBE extends
AbstractExpressionRewriteRule {
}
String id = idGenerator.getNextId().toString();
constMap.put(id, expr);
- Expr staleExpr = ExpressionTranslator.translate(expr, null);
+ Expr staleExpr;
+ try {
+ staleExpr = ExpressionTranslator.translate(expr, null);
+ } catch (Exception e) {
+ LOG.warn("expression {} translate to legacy expr failed. ",
expr, e);
+ return;
+ }
tExprMap.put(id, staleExpr.treeToThrift());
} else {
for (int i = 0; i < expr.children().size(); i++) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]