This is an automated email from the ASF dual-hosted git repository. kxiao pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push: new a171dc5fba2 [fix](Nereids) query failed when fold constant on be failed (#25982) (#26259) a171dc5fba2 is described below commit a171dc5fba24accb9a00ffa9d2d7f8f8764f6d94 Author: morrySnow <101034200+morrys...@users.noreply.github.com> AuthorDate: Thu Nov 2 14:12:17 2023 +0800 [fix](Nereids) query failed when fold constant on be failed (#25982) (#26259) 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 f381f328fd5..db647f114ea 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 @@ -127,7 +127,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: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org