morrySnow commented on code in PR #41546:
URL: https://github.com/apache/doris/pull/41546#discussion_r1794919638


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/FoldConstantRuleOnBE.java:
##########
@@ -199,7 +199,10 @@ private static void collectConst(Expression expr, 
Map<String, Expression> constM
             try {
                 staleExpr = ExpressionTranslator.translate(expr, null);
             } catch (Exception e) {
-                LOG.warn("expression {} translate to legacy expr failed. ", 
expr, e);
+                // match expression need to contain slotReference so it can 
not be folded pr:#39652
+                if (!(expr.containsType(Match.class))) {

Review Comment:
   i think we should not do tranlate match at all? so we should add match into 
shouldSkipFold? because we need to fold its children



-- 
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: commits-unsubscr...@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to