You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/06/29 04:31:03 UTC

[GitHub] [doris] morrySnow commented on a diff in pull request #10481: [feature](nereids) Adjust plan execution flow and fix physical bugs

morrySnow commented on code in PR #10481:
URL: https://github.com/apache/doris/pull/10481#discussion_r909186415


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/NereidsPlanner.java:
##########
@@ -94,16 +97,39 @@ public PhysicalPlan plan(LogicalPlan plan, PhysicalProperties outputProperties,
         OptimizerContext optimizerContext = new OptimizerContext(memo);
         plannerContext = new PlannerContext(optimizerContext, connectContext, outputProperties);
 
-        plannerContext.getOptimizerContext().pushJob(
-                new RewriteBottomUpJob(getRoot(), optimizerContext.getRuleSet().getAnalysisRules(), plannerContext));
-
-        plannerContext.getOptimizerContext().pushJob(new OptimizeGroupJob(getRoot(), plannerContext));
-        plannerContext.getOptimizerContext().getJobScheduler().executeJobPool(plannerContext);
-
         // Get plan directly. Just for SSB.
+        return doPlan();
+    }
+
+    /**
+     * The actual execution of the plan, including the generation and execution of the job.
+     * @return PhysicalPlan.
+     */
+    private PhysicalPlan doPlan() {
+        List<Job> batchRuleJobs = addPlanJobs();
+        for (Job job : batchRuleJobs) {
+            plannerContext.getOptimizerContext().pushJob(job);

Review Comment:
   it is better to show the execute order is optimize job after analysis job explicitly



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