You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "jackwener (via GitHub)" <gi...@apache.org> on 2023/06/18 06:54:39 UTC

[GitHub] [doris] jackwener commented on a diff in pull request #20902: [fix](Nereids): MergeSetOperations can merge SetOperation ALL.

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

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


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