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

[GitHub] [doris] morrySnow opened a new pull request, #20746: [feature](Nereids) add cbo rewrite framework

morrySnow opened a new pull request, #20746:
URL: https://github.com/apache/doris/pull/20746

   ## Proposed changes
   
   Issue Number: close #xxx
   
   <!--Describe your changes.-->
   
   1. rename BatchRewriteJob to AbstractBatchJobExecutor
   2. add a new rewrite job type, CostBasedRewriteJob. It receive a RewriteJob as input, compare the cost of two candidate plans using or not using the input RewriteJob and return the lower cost plan at the rewrite result.
   3. do some small refactor on NereidsPlanner for better abstraction 
   4. do some refactor on dir structure of Nereids
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


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


[GitHub] [doris] morrySnow merged pull request #20746: [feature](Nereids) add cbo rewrite framework

Posted by "morrySnow (via GitHub)" <gi...@apache.org>.
morrySnow merged PR #20746:
URL: https://github.com/apache/doris/pull/20746


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


[GitHub] [doris] morrySnow commented on a diff in pull request #20746: [feature](Nereids) add cbo rewrite framework

Posted by "morrySnow (via GitHub)" <gi...@apache.org>.
morrySnow commented on code in PR #20746:
URL: https://github.com/apache/doris/pull/20746#discussion_r1228901030


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/rewrite/CostBasedRewriteJob.java:
##########
@@ -0,0 +1,90 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.doris.nereids.jobs.rewrite;
+
+import org.apache.doris.common.Pair;
+import org.apache.doris.nereids.CascadesContext;
+import org.apache.doris.nereids.cost.Cost;
+import org.apache.doris.nereids.jobs.JobContext;
+import org.apache.doris.nereids.jobs.executor.Optimizer;
+import org.apache.doris.nereids.jobs.executor.Rewriter;
+import org.apache.doris.nereids.memo.GroupExpression;
+import org.apache.doris.nereids.properties.PhysicalProperties;
+
+import com.google.common.collect.ImmutableList;
+
+import java.util.List;
+import java.util.Optional;
+
+/**
+ * Cost based rewrite job.
+ * This job do
+ */
+public class CostBasedRewriteJob implements RewriteJob {
+
+    private final List<RewriteJob> rewriteJobs;
+
+    public CostBasedRewriteJob(List<RewriteJob> rewriteJobs) {
+        this.rewriteJobs = rewriteJobs;
+        // need to generate real rewrite job list
+    }
+
+    @Override
+    public void execute(JobContext jobContext) {
+        CascadesContext cascadesContext = jobContext.getCascadesContext();
+        CascadesContext skipCboRuleCtx = CascadesContext.newRewriteContext(
+                cascadesContext, cascadesContext.getRewritePlan(),
+                cascadesContext.getCurrentJobContext().getRequiredProperties());
+        CascadesContext applyCboRuleCtx = CascadesContext.newRewriteContext(
+                cascadesContext, cascadesContext.getRewritePlan(),
+                cascadesContext.getCurrentJobContext().getRequiredProperties());
+
+        // Do rewrite on 2 candidates
+        List<RewriteJob> withCboJobs = ImmutableList.<RewriteJob>builder()
+                .addAll(rewriteJobs)
+                .addAll(jobContext.getRemainJobs())
+                .build();
+        new Rewriter(skipCboRuleCtx, jobContext.getRemainJobs()).execute();
+        new Rewriter(applyCboRuleCtx, withCboJobs).execute();
+        if (skipCboRuleCtx.getRewritePlan().deepEquals(applyCboRuleCtx.getRewritePlan())) {
+            // this means rewrite do not do anything
+            return;
+        }
+        // Do optimize on 2 candidates
+        new Optimizer(skipCboRuleCtx).execute();
+        new Optimizer(applyCboRuleCtx).execute();
+        Optional<Pair<Cost, GroupExpression>> skipCboRuleCost = skipCboRuleCtx.getMemo().getRoot()
+                .getLowestCostPlan(PhysicalProperties.GATHER);
+        Optional<Pair<Cost, GroupExpression>> appliedCboRuleCost = applyCboRuleCtx.getMemo().getRoot()
+                .getLowestCostPlan(PhysicalProperties.GATHER);
+        // If one of them optimize failed, just return
+        if (!skipCboRuleCost.isPresent() || !appliedCboRuleCost.isPresent()) {
+            return;

Review Comment:
   right, wo should do some log here



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


[GitHub] [doris] github-actions[bot] commented on pull request #20746: [feature](Nereids) add cbo rewrite framework

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20746:
URL: https://github.com/apache/doris/pull/20746#issuecomment-1590348053

   PR approved by at least one committer and no changes requested.


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


[GitHub] [doris] morrySnow commented on pull request #20746: [feature](Nereids) add cbo rewrite framework

Posted by "morrySnow (via GitHub)" <gi...@apache.org>.
morrySnow commented on PR #20746:
URL: https://github.com/apache/doris/pull/20746#issuecomment-1590518088

   run buildall


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


[GitHub] [doris] englefly commented on a diff in pull request #20746: [feature](Nereids) add cbo rewrite framework

Posted by "englefly (via GitHub)" <gi...@apache.org>.
englefly commented on code in PR #20746:
URL: https://github.com/apache/doris/pull/20746#discussion_r1228260891


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/rewrite/CostBasedRewriteJob.java:
##########
@@ -0,0 +1,90 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.doris.nereids.jobs.rewrite;
+
+import org.apache.doris.common.Pair;
+import org.apache.doris.nereids.CascadesContext;
+import org.apache.doris.nereids.cost.Cost;
+import org.apache.doris.nereids.jobs.JobContext;
+import org.apache.doris.nereids.jobs.executor.Optimizer;
+import org.apache.doris.nereids.jobs.executor.Rewriter;
+import org.apache.doris.nereids.memo.GroupExpression;
+import org.apache.doris.nereids.properties.PhysicalProperties;
+
+import com.google.common.collect.ImmutableList;
+
+import java.util.List;
+import java.util.Optional;
+
+/**
+ * Cost based rewrite job.
+ * This job do
+ */
+public class CostBasedRewriteJob implements RewriteJob {
+
+    private final List<RewriteJob> rewriteJobs;
+
+    public CostBasedRewriteJob(List<RewriteJob> rewriteJobs) {
+        this.rewriteJobs = rewriteJobs;
+        // need to generate real rewrite job list
+    }
+
+    @Override
+    public void execute(JobContext jobContext) {
+        CascadesContext cascadesContext = jobContext.getCascadesContext();
+        CascadesContext skipCboRuleCtx = CascadesContext.newRewriteContext(
+                cascadesContext, cascadesContext.getRewritePlan(),
+                cascadesContext.getCurrentJobContext().getRequiredProperties());
+        CascadesContext applyCboRuleCtx = CascadesContext.newRewriteContext(
+                cascadesContext, cascadesContext.getRewritePlan(),
+                cascadesContext.getCurrentJobContext().getRequiredProperties());
+
+        // Do rewrite on 2 candidates
+        List<RewriteJob> withCboJobs = ImmutableList.<RewriteJob>builder()
+                .addAll(rewriteJobs)
+                .addAll(jobContext.getRemainJobs())
+                .build();
+        new Rewriter(skipCboRuleCtx, jobContext.getRemainJobs()).execute();
+        new Rewriter(applyCboRuleCtx, withCboJobs).execute();
+        if (skipCboRuleCtx.getRewritePlan().deepEquals(applyCboRuleCtx.getRewritePlan())) {
+            // this means rewrite do not do anything
+            return;
+        }
+        // Do optimize on 2 candidates
+        new Optimizer(skipCboRuleCtx).execute();
+        new Optimizer(applyCboRuleCtx).execute();
+        Optional<Pair<Cost, GroupExpression>> skipCboRuleCost = skipCboRuleCtx.getMemo().getRoot()
+                .getLowestCostPlan(PhysicalProperties.GATHER);

Review Comment:
   use GATHER or cascadesContext.getCurrentJobContext().getRequiredProperties() ?



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/rewrite/CostBasedRewriteJob.java:
##########
@@ -0,0 +1,90 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.doris.nereids.jobs.rewrite;
+
+import org.apache.doris.common.Pair;
+import org.apache.doris.nereids.CascadesContext;
+import org.apache.doris.nereids.cost.Cost;
+import org.apache.doris.nereids.jobs.JobContext;
+import org.apache.doris.nereids.jobs.executor.Optimizer;
+import org.apache.doris.nereids.jobs.executor.Rewriter;
+import org.apache.doris.nereids.memo.GroupExpression;
+import org.apache.doris.nereids.properties.PhysicalProperties;
+
+import com.google.common.collect.ImmutableList;
+
+import java.util.List;
+import java.util.Optional;
+
+/**
+ * Cost based rewrite job.
+ * This job do
+ */
+public class CostBasedRewriteJob implements RewriteJob {
+
+    private final List<RewriteJob> rewriteJobs;
+
+    public CostBasedRewriteJob(List<RewriteJob> rewriteJobs) {
+        this.rewriteJobs = rewriteJobs;
+        // need to generate real rewrite job list
+    }
+
+    @Override
+    public void execute(JobContext jobContext) {
+        CascadesContext cascadesContext = jobContext.getCascadesContext();
+        CascadesContext skipCboRuleCtx = CascadesContext.newRewriteContext(
+                cascadesContext, cascadesContext.getRewritePlan(),
+                cascadesContext.getCurrentJobContext().getRequiredProperties());
+        CascadesContext applyCboRuleCtx = CascadesContext.newRewriteContext(
+                cascadesContext, cascadesContext.getRewritePlan(),
+                cascadesContext.getCurrentJobContext().getRequiredProperties());
+
+        // Do rewrite on 2 candidates
+        List<RewriteJob> withCboJobs = ImmutableList.<RewriteJob>builder()
+                .addAll(rewriteJobs)
+                .addAll(jobContext.getRemainJobs())
+                .build();
+        new Rewriter(skipCboRuleCtx, jobContext.getRemainJobs()).execute();
+        new Rewriter(applyCboRuleCtx, withCboJobs).execute();
+        if (skipCboRuleCtx.getRewritePlan().deepEquals(applyCboRuleCtx.getRewritePlan())) {
+            // this means rewrite do not do anything
+            return;
+        }
+        // Do optimize on 2 candidates
+        new Optimizer(skipCboRuleCtx).execute();
+        new Optimizer(applyCboRuleCtx).execute();
+        Optional<Pair<Cost, GroupExpression>> skipCboRuleCost = skipCboRuleCtx.getMemo().getRoot()
+                .getLowestCostPlan(PhysicalProperties.GATHER);
+        Optional<Pair<Cost, GroupExpression>> appliedCboRuleCost = applyCboRuleCtx.getMemo().getRoot()
+                .getLowestCostPlan(PhysicalProperties.GATHER);
+        // If one of them optimize failed, just return
+        if (!skipCboRuleCost.isPresent() || !appliedCboRuleCost.isPresent()) {
+            return;

Review Comment:
   if optimize failed, does it mean that there is a bug?



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/rewrite/CostBasedRewriteJob.java:
##########
@@ -0,0 +1,90 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.doris.nereids.jobs.rewrite;
+
+import org.apache.doris.common.Pair;
+import org.apache.doris.nereids.CascadesContext;
+import org.apache.doris.nereids.cost.Cost;
+import org.apache.doris.nereids.jobs.JobContext;
+import org.apache.doris.nereids.jobs.executor.Optimizer;
+import org.apache.doris.nereids.jobs.executor.Rewriter;
+import org.apache.doris.nereids.memo.GroupExpression;
+import org.apache.doris.nereids.properties.PhysicalProperties;
+
+import com.google.common.collect.ImmutableList;
+
+import java.util.List;
+import java.util.Optional;
+
+/**
+ * Cost based rewrite job.
+ * This job do
+ */
+public class CostBasedRewriteJob implements RewriteJob {
+
+    private final List<RewriteJob> rewriteJobs;
+
+    public CostBasedRewriteJob(List<RewriteJob> rewriteJobs) {
+        this.rewriteJobs = rewriteJobs;
+        // need to generate real rewrite job list
+    }
+
+    @Override
+    public void execute(JobContext jobContext) {
+        CascadesContext cascadesContext = jobContext.getCascadesContext();
+        CascadesContext skipCboRuleCtx = CascadesContext.newRewriteContext(
+                cascadesContext, cascadesContext.getRewritePlan(),
+                cascadesContext.getCurrentJobContext().getRequiredProperties());
+        CascadesContext applyCboRuleCtx = CascadesContext.newRewriteContext(
+                cascadesContext, cascadesContext.getRewritePlan(),
+                cascadesContext.getCurrentJobContext().getRequiredProperties());
+
+        // Do rewrite on 2 candidates
+        List<RewriteJob> withCboJobs = ImmutableList.<RewriteJob>builder()
+                .addAll(rewriteJobs)
+                .addAll(jobContext.getRemainJobs())
+                .build();
+        new Rewriter(skipCboRuleCtx, jobContext.getRemainJobs()).execute();
+        new Rewriter(applyCboRuleCtx, withCboJobs).execute();
+        if (skipCboRuleCtx.getRewritePlan().deepEquals(applyCboRuleCtx.getRewritePlan())) {
+            // this means rewrite do not do anything
+            return;
+        }
+        // Do optimize on 2 candidates
+        new Optimizer(skipCboRuleCtx).execute();
+        new Optimizer(applyCboRuleCtx).execute();
+        Optional<Pair<Cost, GroupExpression>> skipCboRuleCost = skipCboRuleCtx.getMemo().getRoot()
+                .getLowestCostPlan(PhysicalProperties.GATHER);
+        Optional<Pair<Cost, GroupExpression>> appliedCboRuleCost = applyCboRuleCtx.getMemo().getRoot()
+                .getLowestCostPlan(PhysicalProperties.GATHER);
+        // If one of them optimize failed, just return
+        if (!skipCboRuleCost.isPresent() || !appliedCboRuleCost.isPresent()) {
+            return;
+        }
+        // If the candidate applied cbo rule is better, replace the original plan with it.
+        if (appliedCboRuleCost.get().first.getValue() < skipCboRuleCost.get().first.getValue()) {

Review Comment:
   suppose plan A  and B can be optimized to A' and B'. B < A < B' < A' (x<y means plan y is better than plan x)
   But A is evaluated within skipCboRuleContext, B is evaluated within appliedCboRuleContext. Here we get A<B'.
   and hence, we miss A'. Is that right?



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


[GitHub] [doris] morrySnow commented on pull request #20746: [feature](Nereids) add cbo rewrite framework

Posted by "morrySnow (via GitHub)" <gi...@apache.org>.
morrySnow commented on PR #20746:
URL: https://github.com/apache/doris/pull/20746#issuecomment-1588913059

   run buildall


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


[GitHub] [doris] morrySnow commented on a diff in pull request #20746: [feature](Nereids) add cbo rewrite framework

Posted by "morrySnow (via GitHub)" <gi...@apache.org>.
morrySnow commented on code in PR #20746:
URL: https://github.com/apache/doris/pull/20746#discussion_r1228901147


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/rewrite/CostBasedRewriteJob.java:
##########
@@ -0,0 +1,90 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.doris.nereids.jobs.rewrite;
+
+import org.apache.doris.common.Pair;
+import org.apache.doris.nereids.CascadesContext;
+import org.apache.doris.nereids.cost.Cost;
+import org.apache.doris.nereids.jobs.JobContext;
+import org.apache.doris.nereids.jobs.executor.Optimizer;
+import org.apache.doris.nereids.jobs.executor.Rewriter;
+import org.apache.doris.nereids.memo.GroupExpression;
+import org.apache.doris.nereids.properties.PhysicalProperties;
+
+import com.google.common.collect.ImmutableList;
+
+import java.util.List;
+import java.util.Optional;
+
+/**
+ * Cost based rewrite job.
+ * This job do
+ */
+public class CostBasedRewriteJob implements RewriteJob {
+
+    private final List<RewriteJob> rewriteJobs;
+
+    public CostBasedRewriteJob(List<RewriteJob> rewriteJobs) {
+        this.rewriteJobs = rewriteJobs;
+        // need to generate real rewrite job list
+    }
+
+    @Override
+    public void execute(JobContext jobContext) {
+        CascadesContext cascadesContext = jobContext.getCascadesContext();
+        CascadesContext skipCboRuleCtx = CascadesContext.newRewriteContext(
+                cascadesContext, cascadesContext.getRewritePlan(),
+                cascadesContext.getCurrentJobContext().getRequiredProperties());
+        CascadesContext applyCboRuleCtx = CascadesContext.newRewriteContext(
+                cascadesContext, cascadesContext.getRewritePlan(),
+                cascadesContext.getCurrentJobContext().getRequiredProperties());
+
+        // Do rewrite on 2 candidates
+        List<RewriteJob> withCboJobs = ImmutableList.<RewriteJob>builder()
+                .addAll(rewriteJobs)
+                .addAll(jobContext.getRemainJobs())
+                .build();
+        new Rewriter(skipCboRuleCtx, jobContext.getRemainJobs()).execute();
+        new Rewriter(applyCboRuleCtx, withCboJobs).execute();
+        if (skipCboRuleCtx.getRewritePlan().deepEquals(applyCboRuleCtx.getRewritePlan())) {
+            // this means rewrite do not do anything
+            return;
+        }
+        // Do optimize on 2 candidates
+        new Optimizer(skipCboRuleCtx).execute();
+        new Optimizer(applyCboRuleCtx).execute();
+        Optional<Pair<Cost, GroupExpression>> skipCboRuleCost = skipCboRuleCtx.getMemo().getRoot()
+                .getLowestCostPlan(PhysicalProperties.GATHER);

Review Comment:
   u r right



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


[GitHub] [doris] github-actions[bot] commented on pull request #20746: [feature](Nereids) add cbo rewrite framework

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20746:
URL: https://github.com/apache/doris/pull/20746#issuecomment-1590670260

   PR approved by at least one committer and no changes requested.


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


[GitHub] [doris] github-actions[bot] commented on pull request #20746: [feature](Nereids) add cbo rewrite framework

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20746:
URL: https://github.com/apache/doris/pull/20746#issuecomment-1590348114

   PR approved by anyone and no changes requested.


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


[GitHub] [doris] morrySnow commented on pull request #20746: [feature](Nereids) add cbo rewrite framework

Posted by "morrySnow (via GitHub)" <gi...@apache.org>.
morrySnow commented on PR #20746:
URL: https://github.com/apache/doris/pull/20746#issuecomment-1589017154

   run buildall


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


[GitHub] [doris] morrySnow commented on pull request #20746: [feature](Nereids) add cbo rewrite framework

Posted by "morrySnow (via GitHub)" <gi...@apache.org>.
morrySnow commented on PR #20746:
URL: https://github.com/apache/doris/pull/20746#issuecomment-1590411413

   run buildall


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