zhengshiJ commented on code in PR #10481: URL: https://github.com/apache/doris/pull/10481#discussion_r910828405
########## 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: done -- 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