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

kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 5cad1861e5442ec0f45b39d91ce65a592b707179
Author: xzj7019 <131111794+xzj7...@users.noreply.github.com>
AuthorDate: Mon Jul 24 14:21:45 2023 +0800

    [enhance](nereids) enable wf partition topn by default (#21860)
---
 .../java/org/apache/doris/qe/SessionVariable.java  |  2 +-
 .../nereids_tpcds_shape_sf100_p0/shape/query44.out | 52 +++++++++++-----------
 .../nereids_tpcds_shape_sf100_p0/shape/query67.out | 35 ++++++++-------
 .../nereids_tpcds_shape_sf100_p0/shape/query70.out | 27 +++++------
 4 files changed, 60 insertions(+), 56 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java 
b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
index 97b6dcc097..e227f2b0aa 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
@@ -694,7 +694,7 @@ public class SessionVariable implements Serializable, 
Writable {
     private boolean enableBushyTree = false;
 
     @VariableMgr.VarAttr(name = ENABLE_PARTITION_TOPN)
-    private boolean enablePartitionTopN = false;
+    private boolean enablePartitionTopN = true;
 
     @VariableMgr.VarAttr(name = ENABLE_INFER_PREDICATE)
     private boolean enableInferPredicate = true;
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query44.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query44.out
index 4dd4b4da35..5a3c0b08d9 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query44.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query44.out
@@ -19,6 +19,33 @@ PhysicalTopN
 ------------------------PhysicalQuickSort
 --------------------------PhysicalDistribute
 ----------------------------PhysicalQuickSort
+------------------------------PhysicalPartitionTopN
+--------------------------------PhysicalProject
+----------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as 
DOUBLE) > cast((0.9 * rank_col) as DOUBLE))
+------------------------------------hashAgg[GLOBAL]
+--------------------------------------PhysicalDistribute
+----------------------------------------hashAgg[LOCAL]
+------------------------------------------PhysicalProject
+--------------------------------------------filter((ss1.ss_store_sk = 146))
+----------------------------------------------PhysicalOlapScan[store_sales]
+------------------------------------PhysicalDistribute
+--------------------------------------PhysicalAssertNumRows
+----------------------------------------PhysicalDistribute
+------------------------------------------PhysicalProject
+--------------------------------------------hashAgg[GLOBAL]
+----------------------------------------------PhysicalDistribute
+------------------------------------------------hashAgg[LOCAL]
+--------------------------------------------------PhysicalProject
+----------------------------------------------------filter(ss_addr_sk IS 
NULL(store_sales.ss_store_sk = 146))
+------------------------------------------------------PhysicalOlapScan[store_sales]
+--------------PhysicalDistribute
+----------------PhysicalProject
+------------------filter((rnk < 11))
+--------------------PhysicalWindow
+----------------------PhysicalQuickSort
+------------------------PhysicalDistribute
+--------------------------PhysicalQuickSort
+----------------------------PhysicalPartitionTopN
 ------------------------------PhysicalProject
 --------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as 
DOUBLE) > cast((0.9 * rank_col) as DOUBLE))
 ----------------------------------hashAgg[GLOBAL]
@@ -37,29 +64,4 @@ PhysicalTopN
 ------------------------------------------------PhysicalProject
 --------------------------------------------------filter(ss_addr_sk IS 
NULL(store_sales.ss_store_sk = 146))
 
----------------------------------------------------PhysicalOlapScan[store_sales]
---------------PhysicalDistribute
-----------------PhysicalProject
-------------------filter((rnk < 11))
---------------------PhysicalWindow
-----------------------PhysicalQuickSort
-------------------------PhysicalDistribute
---------------------------PhysicalQuickSort
-----------------------------PhysicalProject
-------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as 
DOUBLE) > cast((0.9 * rank_col) as DOUBLE))
---------------------------------hashAgg[GLOBAL]
-----------------------------------PhysicalDistribute
-------------------------------------hashAgg[LOCAL]
---------------------------------------PhysicalProject
-----------------------------------------filter((ss1.ss_store_sk = 146))
-------------------------------------------PhysicalOlapScan[store_sales]
---------------------------------PhysicalDistribute
-----------------------------------PhysicalAssertNumRows
-------------------------------------PhysicalDistribute
---------------------------------------PhysicalProject
-----------------------------------------hashAgg[GLOBAL]
-------------------------------------------PhysicalDistribute
---------------------------------------------hashAgg[LOCAL]
-----------------------------------------------PhysicalProject
-------------------------------------------------filter(ss_addr_sk IS 
NULL(store_sales.ss_store_sk = 146))
---------------------------------------------------PhysicalOlapScan[store_sales]
 
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query67.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query67.out
index 49d605575a..b2c9bc02f7 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query67.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query67.out
@@ -7,25 +7,26 @@ PhysicalTopN
 --------PhysicalWindow
 ----------PhysicalQuickSort
 ------------PhysicalDistribute
---------------PhysicalProject
-----------------hashAgg[GLOBAL]
-------------------PhysicalDistribute
---------------------hashAgg[LOCAL]
-----------------------PhysicalRepeat
-------------------------PhysicalProject
---------------------------hashJoin[INNER_JOIN](store_sales.ss_store_sk = 
store.s_store_sk)
-----------------------------hashJoin[INNER_JOIN](store_sales.ss_item_sk = 
item.i_item_sk)
-------------------------------hashJoin[INNER_JOIN](store_sales.ss_sold_date_sk 
= date_dim.d_date_sk)
---------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[store_sales]
+--------------PhysicalPartitionTopN
+----------------PhysicalProject
+------------------hashAgg[GLOBAL]
+--------------------PhysicalDistribute
+----------------------hashAgg[LOCAL]
+------------------------PhysicalRepeat
+--------------------------PhysicalProject
+----------------------------hashJoin[INNER_JOIN](store_sales.ss_store_sk = 
store.s_store_sk)
+------------------------------hashJoin[INNER_JOIN](store_sales.ss_item_sk = 
item.i_item_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_month_seq >= 
1206)(date_dim.d_month_seq <= 1217))
+----------------------------------------PhysicalOlapScan[date_dim]
 --------------------------------PhysicalDistribute
 ----------------------------------PhysicalProject
-------------------------------------filter((date_dim.d_month_seq >= 
1206)(date_dim.d_month_seq <= 1217))
---------------------------------------PhysicalOlapScan[date_dim]
+------------------------------------PhysicalOlapScan[item]
 ------------------------------PhysicalDistribute
 --------------------------------PhysicalProject
-----------------------------------PhysicalOlapScan[item]
-----------------------------PhysicalDistribute
-------------------------------PhysicalProject
---------------------------------PhysicalOlapScan[store]
+----------------------------------PhysicalOlapScan[store]
 
diff --git 
a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query70.out 
b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query70.out
index b026346094..b5255185bd 100644
--- a/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query70.out
+++ b/regression-test/data/nereids_tpcds_shape_sf100_p0/shape/query70.out
@@ -31,19 +31,20 @@ PhysicalProject
 --------------------------------------filter((ranking <= 5))
 ----------------------------------------PhysicalWindow
 ------------------------------------------PhysicalQuickSort
---------------------------------------------hashAgg[GLOBAL]
-----------------------------------------------PhysicalDistribute
-------------------------------------------------hashAgg[LOCAL]
---------------------------------------------------PhysicalProject
-----------------------------------------------------hashJoin[INNER_JOIN](store.s_store_sk
 = store_sales.ss_store_sk)
-------------------------------------------------------hashJoin[INNER_JOIN](date_dim.d_date_sk
 = store_sales.ss_sold_date_sk)
---------------------------------------------------------PhysicalProject
-----------------------------------------------------------PhysicalOlapScan[store_sales]
+--------------------------------------------PhysicalPartitionTopN
+----------------------------------------------hashAgg[GLOBAL]
+------------------------------------------------PhysicalDistribute
+--------------------------------------------------hashAgg[LOCAL]
+----------------------------------------------------PhysicalProject
+------------------------------------------------------hashJoin[INNER_JOIN](store.s_store_sk
 = store_sales.ss_store_sk)
+--------------------------------------------------------hashJoin[INNER_JOIN](date_dim.d_date_sk
 = store_sales.ss_sold_date_sk)
+----------------------------------------------------------PhysicalProject
+------------------------------------------------------------PhysicalOlapScan[store_sales]
+----------------------------------------------------------PhysicalDistribute
+------------------------------------------------------------PhysicalProject
+--------------------------------------------------------------filter((date_dim.d_month_seq
 >= 1213)(date_dim.d_month_seq <= 1224))
+----------------------------------------------------------------PhysicalOlapScan[date_dim]
 --------------------------------------------------------PhysicalDistribute
 ----------------------------------------------------------PhysicalProject
-------------------------------------------------------------filter((date_dim.d_month_seq
 >= 1213)(date_dim.d_month_seq <= 1224))
---------------------------------------------------------------PhysicalOlapScan[date_dim]
-------------------------------------------------------PhysicalDistribute
---------------------------------------------------------PhysicalProject
-----------------------------------------------------------PhysicalOlapScan[store]
+------------------------------------------------------------PhysicalOlapScan[store]
 


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

Reply via email to