Skip to content

Commit 02ebe0f

Browse files
committed
[fix](regression) Regenerate query44 shape baselines after partition topn rule reorder
Removing CreatePartitionTopNFromWindow from the bottom-up PUSH_DOWN_FILTERS rule set changes rewrite timing for query44, which has no partition-by window key. The two symmetric branches (asceding/i1 vs descending/i2) now tie-break to the opposite side in the cost-based join reorder; verified against a live matched FE+BE cluster that this is a pure left/right swap of two structurally identical subtrees, with no change to PartitionTopN itself. query67 (the actual partition-key-pruning target) is unaffected across all shape_check variants.
1 parent 873a17c commit 02ebe0f

5 files changed

Lines changed: 30 additions & 30 deletions

File tree

‎regression-test/data/shape_check/tpcds_sf100/rf_prune/query44.out‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ PhysicalResultSink
99
------------PhysicalProject
1010
--------------hashJoin[INNER_JOIN broadcast] hashCondition=((asceding.rnk = descending.rnk)) otherCondition=()
1111
----------------PhysicalProject
12-
------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() build RFs:RF1 item_sk->i_item_sk
12+
------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() build RFs:RF1 item_sk->i_item_sk
1313
--------------------PhysicalProject
14-
----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i2.i_product_name)] apply RFs: RF1
14+
----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i1.i_product_name)] apply RFs: RF1
1515
--------------------PhysicalProject
16-
----------------------filter((V21.rnk < 11))
16+
----------------------filter((V11.rnk < 11))
1717
------------------------PhysicalWindow
1818
--------------------------PhysicalQuickSort[MERGE_SORT]
1919
----------------------------PhysicalDistribute[DistributionSpecGather]
@@ -39,11 +39,11 @@ PhysicalResultSink
3939
------------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL)
4040
--------------------------------------------------------PhysicalOlapScan[store_sales]
4141
----------------PhysicalProject
42-
------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() build RFs:RF0 item_sk->i_item_sk
42+
------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() build RFs:RF0 item_sk->i_item_sk
4343
--------------------PhysicalProject
44-
----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i1.i_product_name)] apply RFs: RF0
44+
----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i2.i_product_name)] apply RFs: RF0
4545
--------------------PhysicalProject
46-
----------------------filter((V11.rnk < 11))
46+
----------------------filter((V21.rnk < 11))
4747
------------------------PhysicalWindow
4848
--------------------------PhysicalQuickSort[MERGE_SORT]
4949
----------------------------PhysicalDistribute[DistributionSpecGather]

‎regression-test/data/shape_check/tpcds_sf100/shape/query44.out‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ PhysicalResultSink
99
------------PhysicalProject
1010
--------------hashJoin[INNER_JOIN broadcast] hashCondition=((asceding.rnk = descending.rnk)) otherCondition=()
1111
----------------PhysicalProject
12-
------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() build RFs:RF1 item_sk->i_item_sk
12+
------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() build RFs:RF1 item_sk->i_item_sk
1313
--------------------PhysicalProject
14-
----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i2.i_product_name)] apply RFs: RF1
14+
----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i1.i_product_name)] apply RFs: RF1
1515
--------------------PhysicalProject
16-
----------------------filter((V21.rnk < 11))
16+
----------------------filter((V11.rnk < 11))
1717
------------------------PhysicalWindow
1818
--------------------------PhysicalQuickSort[MERGE_SORT]
1919
----------------------------PhysicalDistribute[DistributionSpecGather]
@@ -39,11 +39,11 @@ PhysicalResultSink
3939
------------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL)
4040
--------------------------------------------------------PhysicalOlapScan[store_sales]
4141
----------------PhysicalProject
42-
------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() build RFs:RF0 item_sk->i_item_sk
42+
------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() build RFs:RF0 item_sk->i_item_sk
4343
--------------------PhysicalProject
44-
----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i1.i_product_name)] apply RFs: RF0
44+
----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i2.i_product_name)] apply RFs: RF0
4545
--------------------PhysicalProject
46-
----------------------filter((V11.rnk < 11))
46+
----------------------filter((V21.rnk < 11))
4747
------------------------PhysicalWindow
4848
--------------------------PhysicalQuickSort[MERGE_SORT]
4949
----------------------------PhysicalDistribute[DistributionSpecGather]

‎regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query44.out‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ PhysicalResultSink
99
------------PhysicalProject
1010
--------------hashJoin[INNER_JOIN broadcast] hashCondition=((asceding.rnk = descending.rnk)) otherCondition=()
1111
----------------PhysicalProject
12-
------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() build RFs:RF1 item_sk->i_item_sk
12+
------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() build RFs:RF1 item_sk->i_item_sk
1313
--------------------PhysicalProject
14-
----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i2.i_product_name)] apply RFs: RF1
14+
----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i1.i_product_name)] apply RFs: RF1
1515
--------------------PhysicalProject
16-
----------------------filter((V21.rnk < 11))
16+
----------------------filter((V11.rnk < 11))
1717
------------------------PhysicalWindow
1818
--------------------------PhysicalQuickSort[MERGE_SORT]
1919
----------------------------PhysicalDistribute[DistributionSpecGather]
@@ -39,11 +39,11 @@ PhysicalResultSink
3939
------------------------------------------------------filter((store_sales.ss_store_sk = 4) and ss_hdemo_sk IS NULL)
4040
--------------------------------------------------------PhysicalOlapScan[store_sales]
4141
----------------PhysicalProject
42-
------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() build RFs:RF0 item_sk->i_item_sk
42+
------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() build RFs:RF0 item_sk->i_item_sk
4343
--------------------PhysicalProject
44-
----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i1.i_product_name)] apply RFs: RF0
44+
----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i2.i_product_name)] apply RFs: RF0
4545
--------------------PhysicalProject
46-
----------------------filter((V11.rnk < 11))
46+
----------------------filter((V21.rnk < 11))
4747
------------------------PhysicalWindow
4848
--------------------------PhysicalQuickSort[MERGE_SORT]
4949
----------------------------PhysicalDistribute[DistributionSpecGather]

‎regression-test/data/shape_check/tpcds_sf1000/shape/query44.out‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ PhysicalResultSink
99
------------PhysicalProject
1010
--------------hashJoin[INNER_JOIN broadcast] hashCondition=((asceding.rnk = descending.rnk)) otherCondition=()
1111
----------------PhysicalProject
12-
------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() build RFs:RF1 item_sk->i_item_sk
12+
------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() build RFs:RF1 item_sk->i_item_sk
1313
--------------------PhysicalProject
14-
----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i2.i_product_name)] apply RFs: RF1
14+
----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i1.i_product_name)] apply RFs: RF1
1515
--------------------PhysicalProject
16-
----------------------filter((V21.rnk < 11))
16+
----------------------filter((V11.rnk < 11))
1717
------------------------PhysicalWindow
1818
--------------------------PhysicalQuickSort[MERGE_SORT]
1919
----------------------------PhysicalDistribute[DistributionSpecGather]
@@ -39,11 +39,11 @@ PhysicalResultSink
3939
------------------------------------------------------filter((store_sales.ss_store_sk = 4) and ss_hdemo_sk IS NULL)
4040
--------------------------------------------------------PhysicalOlapScan[store_sales]
4141
----------------PhysicalProject
42-
------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() build RFs:RF0 item_sk->i_item_sk
42+
------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() build RFs:RF0 item_sk->i_item_sk
4343
--------------------PhysicalProject
44-
----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i1.i_product_name)] apply RFs: RF0
44+
----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i2.i_product_name)] apply RFs: RF0
4545
--------------------PhysicalProject
46-
----------------------filter((V11.rnk < 11))
46+
----------------------filter((V21.rnk < 11))
4747
------------------------PhysicalWindow
4848
--------------------------PhysicalQuickSort[MERGE_SORT]
4949
----------------------------PhysicalDistribute[DistributionSpecGather]

‎regression-test/data/shape_check/tpcds_sf1000_nopkfk/shape/query44.out‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ PhysicalResultSink
99
------------PhysicalProject
1010
--------------hashJoin[INNER_JOIN broadcast] hashCondition=((asceding.rnk = descending.rnk)) otherCondition=()
1111
----------------PhysicalProject
12-
------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() build RFs:RF1 item_sk->i_item_sk
12+
------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() build RFs:RF1 item_sk->i_item_sk
1313
--------------------PhysicalProject
14-
----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i2.i_product_name)] apply RFs: RF1
14+
----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i1.i_product_name)] apply RFs: RF1
1515
--------------------PhysicalProject
16-
----------------------filter((V21.rnk < 11))
16+
----------------------filter((V11.rnk < 11))
1717
------------------------PhysicalWindow
1818
--------------------------PhysicalQuickSort[MERGE_SORT]
1919
----------------------------PhysicalDistribute[DistributionSpecGather]
@@ -39,11 +39,11 @@ PhysicalResultSink
3939
------------------------------------------------------filter((store_sales.ss_store_sk = 4) and ss_hdemo_sk IS NULL)
4040
--------------------------------------------------------PhysicalOlapScan[store_sales]
4141
----------------PhysicalProject
42-
------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() build RFs:RF0 item_sk->i_item_sk
42+
------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() build RFs:RF0 item_sk->i_item_sk
4343
--------------------PhysicalProject
44-
----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i1.i_product_name)] apply RFs: RF0
44+
----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i2.i_product_name)] apply RFs: RF0
4545
--------------------PhysicalProject
46-
----------------------filter((V11.rnk < 11))
46+
----------------------filter((V21.rnk < 11))
4747
------------------------PhysicalWindow
4848
--------------------------PhysicalQuickSort[MERGE_SORT]
4949
----------------------------PhysicalDistribute[DistributionSpecGather]

0 commit comments

Comments
 (0)