924060929 commented on code in PR #10241:
URL: https://github.com/apache/doris/pull/10241#discussion_r901280061


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/rewrite/RewriteBottomUpJob.java:
##########
@@ -72,12 +72,14 @@ public void execute() throws AnalysisException {
                 Preconditions.checkArgument(afters.size() == 1);
                 Plan after = afters.get(0);
                 if (after != before) {
-                    context.getOptimizerContext().getMemo().copyIn(after, 
group, rule.isRewrite());
+                    GroupExpression gexpr = context.getOptimizerContext()
+                            .getMemo()
+                            .copyIn(after, group, rule.isRewrite());
+                    gexpr.setApplied(rule);
                     pushTask(new RewriteBottomUpJob(group, rules, context, 
false));
                     return;
                 }
             }
-            logicalExpression.setApplied(rule);

Review Comment:
   I think we can fix in the future, when we meet the case that rule apply 
multi times.



-- 
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