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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/rewrite/PlanTreeRewriteJob.java:
##########
@@ -48,7 +48,7 @@ protected RewriteResult rewrite(Plan plan, List<Rule> rules, 
RewriteJobContext r
                 Preconditions.checkState(newPlans.size() == 1,
                         "Rewrite rule should generate one plan: " + 
rule.getRuleType());
                 Plan newPlan = newPlans.get(0);
-                if (!newPlan.deepEquals(plan)) {
+                if (!newPlan.deepEquals(plan) || 
!newPlan.getLogicalProperties().equals(plan.getLogicalProperties())) {

Review Comment:
   In my opinion, all Plan.equals() should be implemented to compare their own 
members(except children field) and LogicalProperties.
   If there is some thing wrong, maybe some Plan not compare the 
LogicalProperties.
   
   This change is not quite correct, because it just compare the top plan's 
logicalProperties, child plan with different logicalProperties maybe meet same 
problem.



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