[fix](nereids) plan shape on tpch_sf1T q21 case #19291

This commit is contained in:
minghong
2023-05-05 14:24:28 +08:00
committed by GitHub
parent 525ede54cb
commit 817f3ce510
2 changed files with 21 additions and 63 deletions

View File

@ -3,30 +3,31 @@
PhysicalTopN
--PhysicalDistribute
----PhysicalTopN
------hashAgg[LOCAL]
------hashAgg[GLOBAL]
--------PhysicalDistribute
----------PhysicalProject
------------hashJoin[RIGHT_SEMI_JOIN](l2.l_orderkey = l1.l_orderkey)( not (l_suppkey = l_suppkey))
--------------PhysicalProject
----------------PhysicalOlapScan[lineitem]
--------------hashJoin[INNER_JOIN](orders.o_orderkey = l1.l_orderkey)
----------hashAgg[LOCAL]
------------PhysicalProject
--------------hashJoin[RIGHT_SEMI_JOIN](l2.l_orderkey = l1.l_orderkey)( not (l_suppkey = l_suppkey))
----------------PhysicalProject
------------------filter((orders.o_orderstatus = 'F'))
--------------------PhysicalOlapScan[orders]
----------------hashJoin[RIGHT_ANTI_JOIN](l3.l_orderkey = l1.l_orderkey)( not (l_suppkey = l_suppkey))
------------------PhysicalOlapScan[lineitem]
----------------hashJoin[INNER_JOIN](orders.o_orderkey = l1.l_orderkey)
------------------PhysicalProject
--------------------filter((l3.l_receiptdate > l3.l_commitdate))
----------------------PhysicalOlapScan[lineitem]
------------------hashJoin[INNER_JOIN](supplier.s_suppkey = l1.l_suppkey)
--------------------filter((orders.o_orderstatus = 'F'))
----------------------PhysicalOlapScan[orders]
------------------hashJoin[RIGHT_ANTI_JOIN](l3.l_orderkey = l1.l_orderkey)( not (l_suppkey = l_suppkey))
--------------------PhysicalProject
----------------------filter((l1.l_receiptdate > l1.l_commitdate))
----------------------filter((l3.l_receiptdate > l3.l_commitdate))
------------------------PhysicalOlapScan[lineitem]
--------------------PhysicalDistribute
----------------------hashJoin[INNER_JOIN](supplier.s_nationkey = nation.n_nationkey)
------------------------PhysicalProject
--------------------------PhysicalOlapScan[supplier]
------------------------PhysicalDistribute
--------------------hashJoin[INNER_JOIN](supplier.s_suppkey = l1.l_suppkey)
----------------------PhysicalProject
------------------------filter((l1.l_receiptdate > l1.l_commitdate))
--------------------------PhysicalOlapScan[lineitem]
----------------------PhysicalDistribute
------------------------hashJoin[INNER_JOIN](supplier.s_nationkey = nation.n_nationkey)
--------------------------PhysicalProject
----------------------------filter((nation.n_name = 'SAUDI ARABIA'))
------------------------------PhysicalOlapScan[nation]
----------------------------PhysicalOlapScan[supplier]
--------------------------PhysicalDistribute
----------------------------PhysicalProject
------------------------------filter((nation.n_name = 'SAUDI ARABIA'))
--------------------------------PhysicalOlapScan[nation]

View File

@ -78,47 +78,4 @@ suite("q21") {
s_name
limit 100;
"""
// qt_select """
// explain shape plan
// select
// s_name,
// count(*) as numwait
// from
// supplier,
// lineitem l1,
// orders,
// nation
// where
// s_suppkey = l1.l_suppkey
// and o_orderkey = l1.l_orderkey
// and o_orderstatus = 'F'
// and l1.l_receiptdate > l1.l_commitdate
// and exists (
// select
// *
// from
// lineitem l2
// where
// l2.l_orderkey = l1.l_orderkey
// and l2.l_suppkey <> l1.l_suppkey
// )
// and not exists (
// select
// *
// from
// lineitem l3
// where
// l3.l_orderkey = l1.l_orderkey
// and l3.l_suppkey <> l1.l_suppkey
// and l3.l_receiptdate > l3.l_commitdate
// )
// and s_nationkey = n_nationkey
// and n_name = 'SAUDI ARABIA'
// group by
// s_name
// order by
// numwait desc,
// s_name
// limit 100;
// """
}