Skip to content

Commit

Permalink
fix rt
Browse files Browse the repository at this point in the history
  • Loading branch information
englefly committed Nov 17, 2023
1 parent 07f30ad commit e48aa32
Show file tree
Hide file tree
Showing 15 changed files with 78 additions and 77 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ public void removeFilter(ExprId targetId, PhysicalHashJoin builderNode) {
for (Slot target : rf.getTargetSlots()) {
if (target.getExprId().equals(targetId)) {
Pair<PhysicalRelation, Slot> pair = aliasTransferMap.get(target);
Preconditions.checkArgument(pair != null,
"cannot find slot %s in aliasTransferMap", target);
pair.first.removeAppliedRuntimeFilter(rf);
if(pair != null) {
pair.first.removeAppliedRuntimeFilter(rf);
}
}
}
iter.remove();
Expand Down
10 changes: 5 additions & 5 deletions regression-test/data/nereids_hint_tpch_p0/shape/q10.out
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ PhysicalResultSink
----------PhysicalDistribute
------------hashAgg[LOCAL]
--------------PhysicalProject
----------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey))otherCondition=()
----------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey]
------------------PhysicalProject
--------------------filter((lineitem.l_returnflag = 'R'))
----------------------PhysicalOlapScan[lineitem]
----------------------PhysicalOlapScan[lineitem] apply RFs: RF2
------------------PhysicalDistribute
--------------------PhysicalProject
----------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_nationkey = nation.n_nationkey))otherCondition=()
----------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF1 n_nationkey->[c_nationkey]
------------------------PhysicalDistribute
--------------------------PhysicalProject
----------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey))otherCondition=()
----------------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 o_custkey->[c_custkey]
------------------------------PhysicalProject
--------------------------------PhysicalOlapScan[customer]
--------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF1
------------------------------PhysicalDistribute
--------------------------------PhysicalProject
----------------------------------filter((orders.o_orderdate < '1994-01-01') and (orders.o_orderdate >= '1993-10-01'))
Expand Down
4 changes: 2 additions & 2 deletions regression-test/data/nereids_hint_tpch_p0/shape/q12.out
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ PhysicalResultSink
----------PhysicalDistribute
------------hashAgg[LOCAL]
--------------PhysicalProject
----------------hashJoin[INNER_JOIN] hashCondition=((orders.o_orderkey = lineitem.l_orderkey))otherCondition=()
----------------hashJoin[INNER_JOIN] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF0 l_orderkey->[o_orderkey]
------------------PhysicalProject
--------------------PhysicalOlapScan[orders]
--------------------PhysicalOlapScan[orders] apply RFs: RF0
------------------PhysicalProject
--------------------filter((lineitem.l_commitdate < lineitem.l_receiptdate) and (lineitem.l_receiptdate < '1995-01-01') and (lineitem.l_receiptdate >= '1994-01-01') and (lineitem.l_shipdate < lineitem.l_commitdate) and l_shipmode IN ('MAIL', 'SHIP'))
----------------------PhysicalOlapScan[lineitem]
Expand Down
4 changes: 2 additions & 2 deletions regression-test/data/nereids_hint_tpch_p0/shape/q13.out
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ PhysicalResultSink
--------------PhysicalProject
----------------hashAgg[LOCAL]
------------------PhysicalProject
--------------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey))otherCondition=()
--------------------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey]
----------------------PhysicalDistribute
------------------------PhysicalProject
--------------------------filter(( not (o_comment like '%special%requests%')))
----------------------------PhysicalOlapScan[orders]
----------------------------PhysicalOlapScan[orders] apply RFs: RF0
----------------------PhysicalDistribute
------------------------PhysicalProject
--------------------------PhysicalOlapScan[customer]
Expand Down
4 changes: 2 additions & 2 deletions regression-test/data/nereids_hint_tpch_p0/shape/q14.out
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ PhysicalResultSink
------PhysicalDistribute
--------hashAgg[LOCAL]
----------PhysicalProject
------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_partkey = part.p_partkey))otherCondition=()
------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 l_partkey->[p_partkey]
--------------PhysicalProject
----------------PhysicalOlapScan[part]
----------------PhysicalOlapScan[part] apply RFs: RF0
--------------PhysicalDistribute
----------------PhysicalProject
------------------filter((lineitem.l_shipdate < '1995-10-01') and (lineitem.l_shipdate >= '1995-09-01'))
Expand Down
6 changes: 3 additions & 3 deletions regression-test/data/nereids_hint_tpch_p0/shape/q16.out
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ PhysicalResultSink
--------hashAgg[GLOBAL]
----------PhysicalDistribute
------------hashAgg[LOCAL]
--------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey))otherCondition=()
--------------hashJoin[LEFT_ANTI_JOIN] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=()
----------------PhysicalDistribute
------------------PhysicalProject
--------------------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = partsupp.ps_partkey))otherCondition=()
--------------------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = partsupp.ps_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey]
----------------------PhysicalProject
------------------------PhysicalOlapScan[partsupp]
------------------------PhysicalOlapScan[partsupp] apply RFs: RF0
----------------------PhysicalProject
------------------------filter(( not (p_brand = 'Brand#45')) and ( not (p_type like 'MEDIUM POLISHED%')) and p_size IN (14, 19, 23, 3, 36, 45, 49, 9))
--------------------------PhysicalOlapScan[part]
Expand Down
4 changes: 2 additions & 2 deletions regression-test/data/nereids_hint_tpch_p0/shape/q19.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ PhysicalResultSink
----PhysicalDistribute
------hashAgg[LOCAL]
--------PhysicalProject
----------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = lineitem.l_partkey))otherCondition=(((((((part.p_brand = 'Brand#12') AND p_container IN ('SM BOX', 'SM CASE', 'SM PACK', 'SM PKG')) AND ((lineitem.l_quantity >= 1.00) AND (lineitem.l_quantity <= 11.00))) AND (part.p_size <= 5)) OR ((((part.p_brand = 'Brand#23') AND p_container IN ('MED BAG', 'MED BOX', 'MED PACK', 'MED PKG')) AND ((lineitem.l_quantity >= 10.00) AND (lineitem.l_quantity <= 20.00))) AND (part.p_size <= 10))) OR ((((part.p_brand = 'Brand#34') AND p_container IN ('LG BOX', 'LG CASE', 'LG PACK', 'LG PKG')) AND ((lineitem.l_quantity >= 20.00) AND (lineitem.l_quantity <= 30.00))) AND (part.p_size <= 15))))
----------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=(((((((part.p_brand = 'Brand#12') AND p_container IN ('SM BOX', 'SM CASE', 'SM PACK', 'SM PKG')) AND ((lineitem.l_quantity >= 1.00) AND (lineitem.l_quantity <= 11.00))) AND (part.p_size <= 5)) OR ((((part.p_brand = 'Brand#23') AND p_container IN ('MED BAG', 'MED BOX', 'MED PACK', 'MED PKG')) AND ((lineitem.l_quantity >= 10.00) AND (lineitem.l_quantity <= 20.00))) AND (part.p_size <= 10))) OR ((((part.p_brand = 'Brand#34') AND p_container IN ('LG BOX', 'LG CASE', 'LG PACK', 'LG PKG')) AND ((lineitem.l_quantity >= 20.00) AND (lineitem.l_quantity <= 30.00))) AND (part.p_size <= 15)))) build RFs:RF0 p_partkey->[l_partkey]
------------PhysicalDistribute
--------------PhysicalProject
----------------filter(((((lineitem.l_quantity >= 1.00) AND (lineitem.l_quantity <= 11.00)) OR ((lineitem.l_quantity >= 10.00) AND (lineitem.l_quantity <= 20.00))) OR ((lineitem.l_quantity >= 20.00) AND (lineitem.l_quantity <= 30.00))) and (lineitem.l_shipinstruct = 'DELIVER IN PERSON') and l_shipmode IN ('AIR REG', 'AIR'))
------------------PhysicalOlapScan[lineitem]
------------------PhysicalOlapScan[lineitem] apply RFs: RF0
------------PhysicalDistribute
--------------PhysicalProject
----------------filter((((((part.p_brand = 'Brand#12') AND p_container IN ('SM BOX', 'SM CASE', 'SM PACK', 'SM PKG')) AND (part.p_size <= 5)) OR (((part.p_brand = 'Brand#23') AND p_container IN ('MED BAG', 'MED BOX', 'MED PACK', 'MED PKG')) AND (part.p_size <= 10))) OR (((part.p_brand = 'Brand#34') AND p_container IN ('LG BOX', 'LG CASE', 'LG PACK', 'LG PKG')) AND (part.p_size <= 15))) and (part.p_size >= 1))
Expand Down
8 changes: 4 additions & 4 deletions regression-test/data/nereids_hint_tpch_p0/shape/q3.out
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ PhysicalResultSink
------PhysicalTopN[LOCAL_SORT]
--------hashAgg[LOCAL]
----------PhysicalProject
------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey))otherCondition=()
------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey]
--------------PhysicalProject
----------------filter((lineitem.l_shipdate > '1995-03-15'))
------------------PhysicalOlapScan[lineitem]
------------------PhysicalOlapScan[lineitem] apply RFs: RF1
--------------PhysicalDistribute
----------------PhysicalProject
------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey))otherCondition=()
------------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey]
--------------------PhysicalDistribute
----------------------PhysicalProject
------------------------filter((orders.o_orderdate < '1995-03-15'))
--------------------------PhysicalOlapScan[orders]
--------------------------PhysicalOlapScan[orders] apply RFs: RF0
--------------------PhysicalDistribute
----------------------PhysicalProject
------------------------filter((customer.c_mktsegment = 'BUILDING'))
Expand Down
4 changes: 2 additions & 2 deletions regression-test/data/nereids_hint_tpch_p0/shape/q4.out
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ PhysicalResultSink
----------PhysicalDistribute
------------hashAgg[LOCAL]
--------------PhysicalProject
----------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey))otherCondition=()
----------------hashJoin[RIGHT_SEMI_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF0 o_orderkey->[l_orderkey]
------------------PhysicalProject
--------------------filter((lineitem.l_commitdate < lineitem.l_receiptdate))
----------------------PhysicalOlapScan[lineitem]
----------------------PhysicalOlapScan[lineitem] apply RFs: RF0
------------------PhysicalProject
--------------------filter((orders.o_orderdate < '1993-10-01') and (orders.o_orderdate >= '1993-07-01'))
----------------------PhysicalOlapScan[orders]
Expand Down
18 changes: 9 additions & 9 deletions regression-test/data/nereids_hint_tpch_p0/shape/q5.out
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,36 @@ PhysicalResultSink
----------PhysicalDistribute
------------hashAgg[LOCAL]
--------------PhysicalProject
----------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey) and (customer.c_nationkey = supplier.s_nationkey))otherCondition=()
----------------hashJoin[INNER_JOIN] hashCondition=((customer.c_custkey = orders.o_custkey) and (customer.c_nationkey = supplier.s_nationkey)) otherCondition=() build RFs:RF4 c_nationkey->[s_nationkey];RF5 c_custkey->[o_custkey]
------------------PhysicalDistribute
--------------------PhysicalProject
----------------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey))otherCondition=()
----------------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF3 o_orderkey->[l_orderkey]
------------------------PhysicalDistribute
--------------------------PhysicalProject
----------------------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_suppkey = supplier.s_suppkey))otherCondition=()
----------------------------hashJoin[INNER_JOIN] hashCondition=((lineitem.l_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF2 s_suppkey->[l_suppkey]
------------------------------PhysicalDistribute
--------------------------------PhysicalProject
----------------------------------PhysicalOlapScan[lineitem]
----------------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 RF3
------------------------------PhysicalDistribute
--------------------------------PhysicalProject
----------------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey))otherCondition=()
----------------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF1 n_nationkey->[s_nationkey]
------------------------------------PhysicalDistribute
--------------------------------------PhysicalProject
----------------------------------------PhysicalOlapScan[supplier]
----------------------------------------PhysicalOlapScan[supplier] apply RFs: RF1 RF4
------------------------------------PhysicalDistribute
--------------------------------------PhysicalProject
----------------------------------------hashJoin[INNER_JOIN] hashCondition=((nation.n_regionkey = region.r_regionkey))otherCondition=()
----------------------------------------hashJoin[INNER_JOIN] hashCondition=((nation.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF0 r_regionkey->[n_regionkey]
------------------------------------------PhysicalDistribute
--------------------------------------------PhysicalProject
----------------------------------------------PhysicalOlapScan[nation]
----------------------------------------------PhysicalOlapScan[nation] apply RFs: RF0
------------------------------------------PhysicalDistribute
--------------------------------------------PhysicalProject
----------------------------------------------filter((region.r_name = 'ASIA'))
------------------------------------------------PhysicalOlapScan[region]
------------------------PhysicalDistribute
--------------------------PhysicalProject
----------------------------filter((orders.o_orderdate < '1995-01-01') and (orders.o_orderdate >= '1994-01-01'))
------------------------------PhysicalOlapScan[orders]
------------------------------PhysicalOlapScan[orders] apply RFs: RF5
------------------PhysicalDistribute
--------------------PhysicalProject
----------------------PhysicalOlapScan[customer]
Expand Down
16 changes: 8 additions & 8 deletions regression-test/data/nereids_hint_tpch_p0/shape/q9.out
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,31 @@ PhysicalResultSink
----------PhysicalDistribute
------------hashAgg[LOCAL]
--------------PhysicalProject
----------------hashJoin[INNER_JOIN] hashCondition=((partsupp.ps_partkey = lineitem.l_partkey) and (partsupp.ps_suppkey = lineitem.l_suppkey))otherCondition=()
----------------hashJoin[INNER_JOIN] hashCondition=((partsupp.ps_partkey = lineitem.l_partkey) and (partsupp.ps_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF4 ps_partkey->[l_partkey];RF5 ps_suppkey->[l_suppkey]
------------------PhysicalDistribute
--------------------PhysicalProject
----------------------hashJoin[INNER_JOIN] hashCondition=((orders.o_orderkey = lineitem.l_orderkey))otherCondition=()
----------------------hashJoin[INNER_JOIN] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF3 l_orderkey->[o_orderkey]
------------------------PhysicalProject
--------------------------PhysicalOlapScan[orders]
--------------------------PhysicalOlapScan[orders] apply RFs: RF3
------------------------PhysicalDistribute
--------------------------PhysicalProject
----------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey))otherCondition=()
----------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF2 s_suppkey->[l_suppkey]
------------------------------PhysicalDistribute
--------------------------------PhysicalProject
----------------------------------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = lineitem.l_partkey))otherCondition=()
----------------------------------hashJoin[INNER_JOIN] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF1 p_partkey->[l_partkey]
------------------------------------PhysicalDistribute
--------------------------------------PhysicalProject
----------------------------------------PhysicalOlapScan[lineitem]
----------------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 RF2 RF4 RF5
------------------------------------PhysicalDistribute
--------------------------------------PhysicalProject
----------------------------------------filter((p_name like '%green%'))
------------------------------------------PhysicalOlapScan[part]
------------------------------PhysicalDistribute
--------------------------------PhysicalProject
----------------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey))otherCondition=()
----------------------------------hashJoin[INNER_JOIN] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[s_nationkey]
------------------------------------PhysicalDistribute
--------------------------------------PhysicalProject
----------------------------------------PhysicalOlapScan[supplier]
----------------------------------------PhysicalOlapScan[supplier] apply RFs: RF0
------------------------------------PhysicalDistribute
--------------------------------------PhysicalProject
----------------------------------------PhysicalOlapScan[nation]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
--PhysicalResultSink
----PhysicalDistribute
------PhysicalProject
--------hashJoin[INNER_JOIN] hashCondition=((m1.k1 = m2.k1))otherCondition=()
--------hashJoin[INNER_JOIN] hashCondition=((m1.k1 = m2.k1)) otherCondition=()
----------PhysicalDistribute
------------filter((temp.k1 = 1))
--------------PhysicalCteConsumer ( cteId=CTEId#0 )
Expand All @@ -32,7 +32,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 )
--PhysicalResultSink
----PhysicalDistribute
------PhysicalProject
--------hashJoin[INNER_JOIN] hashCondition=((m1.k1 = m2.k1))otherCondition=()
--------hashJoin[INNER_JOIN] hashCondition=((m1.k1 = m2.k1)) otherCondition=()
----------PhysicalDistribute
------------filter((temp.k1 = 1))
--------------PhysicalCteConsumer ( cteId=CTEId#0 )
Expand Down
Loading

0 comments on commit e48aa32

Please sign in to comment.