jackwener commented on code in PR #20902:
URL: https://github.com/apache/doris/pull/20902#discussion_r1233210655


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/executor/Rewriter.java:
##########
@@ -217,21 +217,28 @@ public class Rewriter extends AbstractBatchJobExecutor {
             // this rule should invoke after ColumnPruning
             custom(RuleType.ELIMINATE_UNNECESSARY_PROJECT, 
EliminateUnnecessaryProject::new),
 
-            // we need to execute this rule at the end of rewrite
-            // to avoid two consecutive same project appear when we do 
optimization.
             topic("Others optimization",
-                    
bottomUp(ImmutableList.<RuleFactory>builder().addAll(ImmutableList.of(
-                            new EliminateNotNull(),
-                            new EliminateLimit(),
-                            new EliminateFilter(),
-                            new EliminateAggregate(),
-                            new MergeSetOperations(),
-                            new PushdownLimit(),
-                            new BuildAggForUnion()
-                            // after eliminate filter, the project maybe can 
push down again,
-                            // so we add push down rules
-                    )).addAll(RuleSet.PUSH_DOWN_FILTERS).build())
+                    bottomUp(ImmutableList.<RuleFactory>builder()
+                            .addAll(ImmutableList.of(
+                                    new EliminateNotNull(),
+                                    new EliminateLimit(),
+                                    new EliminateFilter(),
+                                    new EliminateAggregate(),
+                                    new PushdownLimit()
+                            ))
+                            // after eliminate some plan, we maybe can push 
down some plan again, so add push down rules
+                            .add(new PushdownLimit())
+                            .addAll(RuleSet.PUSH_DOWN_FILTERS)
+                            .build()
+                    )
             ),
+
+            topic("Intersection optimization",

Review Comment:
   should be `SetOperation optimization`, next PR fix it



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to