This is an automated email from the ASF dual-hosted git repository. lingmiao pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new a2df5beebb [fix](Nereids): fix ut. (#10658) a2df5beebb is described below commit a2df5beebbf6abf00acd1e49d6c7f7d4e14f0e41 Author: jakevin <30525741+jackwe...@users.noreply.github.com> AuthorDate: Thu Jul 7 12:00:47 2022 +0800 [fix](Nereids): fix ut. (#10658) fix ut. --- .../nereids/rules/rewrite/logical/AnalyzeUtils.java | 16 ++++++++-------- .../nereids/rules/rewrite/logical/ColumnPruningTest.java | 13 +++++++------ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/logical/AnalyzeUtils.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/logical/AnalyzeUtils.java index 72f5582169..857e155756 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/logical/AnalyzeUtils.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/logical/AnalyzeUtils.java @@ -17,8 +17,8 @@ package org.apache.doris.nereids.rules.rewrite.logical; -import org.apache.doris.nereids.OptimizerContext; import org.apache.doris.nereids.PlannerContext; +import org.apache.doris.nereids.jobs.JobContext; import org.apache.doris.nereids.jobs.rewrite.RewriteBottomUpJob; import org.apache.doris.nereids.memo.Memo; import org.apache.doris.nereids.parser.NereidsParser; @@ -50,13 +50,13 @@ public class AnalyzeUtils { private static LogicalPlan analyze(LogicalPlan inputPlan, ConnectContext connectContext) { Memo memo = new Memo(); memo.initialize(inputPlan); - OptimizerContext optimizerContext = new OptimizerContext(memo); - PlannerContext plannerContext = new PlannerContext(optimizerContext, connectContext, new PhysicalProperties()); - optimizerContext.pushJob( - new RewriteBottomUpJob(memo.getRoot(), new BindSlotReference().buildRules(), plannerContext)); - optimizerContext.pushJob( - new RewriteBottomUpJob(memo.getRoot(), new BindRelation().buildRules(), plannerContext)); - plannerContext.getOptimizerContext().getJobScheduler().executeJobPool(plannerContext); + PlannerContext plannerContext = new PlannerContext(memo, connectContext); + JobContext jobContext = new JobContext(plannerContext, new PhysicalProperties(), 0); + plannerContext.pushJob( + new RewriteBottomUpJob(memo.getRoot(), new BindSlotReference().buildRules(), jobContext)); + plannerContext.pushJob( + new RewriteBottomUpJob(memo.getRoot(), new BindRelation().buildRules(), jobContext)); + jobContext.getPlannerContext().getJobScheduler().executeJobPool(plannerContext); return (LogicalPlan) memo.copyOut(); } } diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/logical/ColumnPruningTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/logical/ColumnPruningTest.java index 23638bc5d4..aeb47a5f33 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/logical/ColumnPruningTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/logical/ColumnPruningTest.java @@ -17,8 +17,8 @@ package org.apache.doris.nereids.rules.rewrite.logical; -import org.apache.doris.nereids.OptimizerContext; import org.apache.doris.nereids.PlannerContext; +import org.apache.doris.nereids.jobs.JobContext; import org.apache.doris.nereids.jobs.rewrite.RewriteTopDownJob; import org.apache.doris.nereids.memo.Memo; import org.apache.doris.nereids.operators.plans.logical.LogicalProject; @@ -26,6 +26,7 @@ import org.apache.doris.nereids.operators.plans.logical.LogicalRelation; import org.apache.doris.nereids.properties.PhysicalProperties; import org.apache.doris.nereids.trees.expressions.NamedExpression; import org.apache.doris.nereids.trees.plans.Plan; +import org.apache.doris.qe.ConnectContext; import org.apache.doris.utframe.TestWithFeService; import com.google.common.collect.Lists; @@ -212,12 +213,12 @@ public class ColumnPruningTest extends TestWithFeService { } private Plan process(Memo memo) { - OptimizerContext optimizerContext = new OptimizerContext(memo); - PlannerContext plannerContext = new PlannerContext(optimizerContext, connectContext, new PhysicalProperties()); + PlannerContext plannerContext = new PlannerContext(memo, new ConnectContext()); + JobContext jobContext = new JobContext(plannerContext, new PhysicalProperties(), 0); RewriteTopDownJob rewriteTopDownJob = new RewriteTopDownJob(memo.getRoot(), new ColumnPruning().buildRules(), - plannerContext); - plannerContext.getOptimizerContext().pushJob(rewriteTopDownJob); - plannerContext.getOptimizerContext().getJobScheduler().executeJobPool(plannerContext); + jobContext); + jobContext.getPlannerContext().pushJob(rewriteTopDownJob); + jobContext.getPlannerContext().getJobScheduler().executeJobPool(plannerContext); return memo.copyOut(); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org