adonis0147 commented on code in PR #11299: URL: https://github.com/apache/doris/pull/11299#discussion_r933724598
########## fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/logical/PushPredicateThroughJoin.java: ########## @@ -122,15 +121,14 @@ private Plan pushDownPredicate(LogicalJoin<GroupPlan, GroupPlan> joinPlan, Expression left = ExpressionUtils.and(leftPredicates); Expression right = ExpressionUtils.and(rightPredicates); //todo expr should optimize again using expr rewrite - ExpressionRuleExecutor exprRewriter = new ExpressionRuleExecutor(); Plan leftPlan = joinPlan.left(); Plan rightPlan = joinPlan.right(); if (!left.equals(BooleanLiteral.TRUE)) { - leftPlan = new LogicalFilter(exprRewriter.rewrite(left), leftPlan); + leftPlan = new LogicalFilter(left, leftPlan); Review Comment: The original `ExpressionRuleExecutor` mixes two types of rules, ones are used for normalization and the others for optimization. In pushing predicates stage, we don't need to do normalization. This pull request aims at separating these types of rules. If you think we can apply rules to optimize expressions, you are welcome to add code to do it. BTW, the normalization step is moved to [NereidsPlanner](https://github.com/apache/doris/pull/11299/files#diff-c1663569310d5cae9415d2b9b43196ca09b7761818e456c0b1da9bff5ea75a3c)](https://github.com/apache/doris/pull/11299/files#diff-c1663569310d5cae9415d2b9b43196ca09b7761818e456c0b1da9bff5ea75a3cR124). -- 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