You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2023/06/09 05:42:48 UTC

[doris] 01/01: [opt](Nereids) remove running in OptimizeGroup to avoid recompute on it parent

This is an automated email from the ASF dual-hosted git repository.

morrysnow pushed a commit to branch plan_slow
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 83024940887a936b7827ab567a180a4af7ece7c0
Author: morrySnow <mo...@126.com>
AuthorDate: Thu Jun 8 19:05:56 2023 +0800

    [opt](Nereids) remove running in OptimizeGroup to avoid recompute on it parent
---
 .../nereids/jobs/cascades/OptimizeGroupJob.java    |  3 +-
 .../nereids_tpcds_shape_sf100_p0/shape/query33.out | 44 +++++++++++-----------
 2 files changed, 23 insertions(+), 24 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/cascades/OptimizeGroupJob.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/cascades/OptimizeGroupJob.java
index 2bda4ce569..88200d227c 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/cascades/OptimizeGroupJob.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/cascades/OptimizeGroupJob.java
@@ -42,8 +42,7 @@ public class OptimizeGroupJob extends Job {
     @Override
     public void execute() {
         COUNTER_TRACER.log(CounterEvent.of(Memo.getStateId(), CounterType.JOB_EXECUTION, group, null, null));
-        if (group.getCostLowerBound() > context.getCostUpperBound()
-                || group.getLowestCostPlan(context.getRequiredProperties()).isPresent()) {
+        if (group.getLowestCostPlan(context.getRequiredProperties()).isPresent()) {
             return;
         }
         if (!group.isExplored()) {
diff --git a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query33.out b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query33.out
index cd1a4d6dbb..559cbef994 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query33.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query33.out
@@ -8,32 +8,32 @@ PhysicalTopN
 ----------hashAgg[LOCAL]
 ------------PhysicalUnion
 --------------PhysicalProject
-----------------hashAgg[GLOBAL]
-------------------PhysicalDistribute
---------------------hashAgg[LOCAL]
-----------------------PhysicalProject
-------------------------hashJoin[INNER_JOIN](store_sales.ss_item_sk = item.i_item_sk)
---------------------------PhysicalProject
-----------------------------hashJoin[INNER_JOIN](store_sales.ss_addr_sk = customer_address.ca_address_sk)
-------------------------------hashJoin[INNER_JOIN](store_sales.ss_sold_date_sk = date_dim.d_date_sk)
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[store_sales]
+----------------hashJoin[LEFT_SEMI_JOIN](item.i_manufact_id = item.i_manufact_id)
+------------------hashAgg[GLOBAL]
+--------------------PhysicalDistribute
+----------------------hashAgg[LOCAL]
+------------------------PhysicalProject
+--------------------------hashJoin[INNER_JOIN](store_sales.ss_item_sk = item.i_item_sk)
+----------------------------PhysicalProject
+------------------------------hashJoin[INNER_JOIN](store_sales.ss_addr_sk = customer_address.ca_address_sk)
+--------------------------------hashJoin[INNER_JOIN](store_sales.ss_sold_date_sk = date_dim.d_date_sk)
+----------------------------------PhysicalProject
+------------------------------------PhysicalOlapScan[store_sales]
+----------------------------------PhysicalDistribute
+------------------------------------PhysicalProject
+--------------------------------------filter((date_dim.d_moy = 1)(date_dim.d_year = 2002))
+----------------------------------------PhysicalOlapScan[date_dim]
 --------------------------------PhysicalDistribute
 ----------------------------------PhysicalProject
-------------------------------------filter((date_dim.d_moy = 1)(date_dim.d_year = 2002))
---------------------------------------PhysicalOlapScan[date_dim]
-------------------------------PhysicalDistribute
---------------------------------PhysicalProject
-----------------------------------filter((customer_address.ca_gmt_offset = -5.00))
-------------------------------------PhysicalOlapScan[customer_address]
---------------------------PhysicalDistribute
-----------------------------hashJoin[LEFT_SEMI_JOIN](item.i_manufact_id = item.i_manufact_id)
+------------------------------------filter((customer_address.ca_gmt_offset = -5.00))
+--------------------------------------PhysicalOlapScan[customer_address]
+----------------------------PhysicalDistribute
 ------------------------------PhysicalProject
 --------------------------------PhysicalOlapScan[item]
-------------------------------PhysicalDistribute
---------------------------------PhysicalProject
-----------------------------------filter((item.i_category = 'Home'))
-------------------------------------PhysicalOlapScan[item]
+------------------PhysicalDistribute
+--------------------PhysicalProject
+----------------------filter((item.i_category = 'Home'))
+------------------------PhysicalOlapScan[item]
 --------------PhysicalProject
 ----------------hashJoin[LEFT_SEMI_JOIN](item.i_manufact_id = item.i_manufact_id)
 ------------------hashAgg[GLOBAL]


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