Skip to content

Commit

Permalink
[test](Nereids): add regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
jackwener committed Dec 5, 2023
1 parent f62e32a commit 879acca
Show file tree
Hide file tree
Showing 5 changed files with 636 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ PhysicalResultSink
PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t.score = t.score))otherCondition=()
------hashJoin[LEFT_SEMI_JOIN] hashCondition=((t.score = t.score)) otherCondition=() build RFs:RF0 score->[score]
--------filter(( not score IS NULL) and (t.score > 0))
----------PhysicalOlapScan[t]
----------PhysicalOlapScan[t] apply RFs: RF0
--------PhysicalDistribute
----------PhysicalProject
------------filter((t.score > 0))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,95 +3,140 @@
PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id))otherCondition=()
--------PhysicalOlapScan[t]
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id]
--------PhysicalOlapScan[t] apply RFs: RF0
--------filter((t2.score > 10))
----------PhysicalOlapScan[t]

-- !right_outer --
PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id))otherCondition=()
--------PhysicalOlapScan[t]
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id]
--------PhysicalOlapScan[t] apply RFs: RF0
--------filter((t1.score > 10))
----------PhysicalOlapScan[t]

-- !full_outer_join --
PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id))otherCondition=()
--------PhysicalOlapScan[t]
------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id]
--------PhysicalOlapScan[t] apply RFs: RF0
--------filter((t1.score > 10))
----------PhysicalOlapScan[t]

-- !full_outer_join --
PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id))otherCondition=()
--------PhysicalOlapScan[t]
------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id]
--------PhysicalOlapScan[t] apply RFs: RF0
--------filter((t2.score > 10))
----------PhysicalOlapScan[t]

-- !full_outer_join --
PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id))otherCondition=()
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id]
--------filter((t1.score > 10))
----------PhysicalOlapScan[t]
----------PhysicalOlapScan[t] apply RFs: RF0
--------filter((t2.score > 10))
----------PhysicalOlapScan[t]

-- !left_outer --
PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id))otherCondition=()
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id]
--------filter((t1.score > 10))
----------PhysicalOlapScan[t]
----------PhysicalOlapScan[t] apply RFs: RF0
--------filter((t2.score > 10))
----------PhysicalOlapScan[t]

-- !multiple_left_outer --
-- !multiple_left_outer_1 --
PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id))otherCondition=()
--------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id))otherCondition=()
----------PhysicalOlapScan[t]
------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=()
--------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id]
----------PhysicalOlapScan[t] apply RFs: RF0
----------filter((t1.score > 10))
------------PhysicalOlapScan[t]
--------PhysicalOlapScan[t]

-- !multiple_left_outer --
-- !multiple_left_outer_2 --
PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id))otherCondition=()
--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id))otherCondition=()
----------PhysicalOlapScan[t]
------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=()
--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id]
----------PhysicalOlapScan[t] apply RFs: RF0
----------filter((t2.score > 10))
------------PhysicalOlapScan[t]
--------PhysicalOlapScan[t]

-- !left_outer_join_non_null_assertion --
-- !multiple_right_outer_1 --
PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF1 id->[id]
--------PhysicalOlapScan[t] apply RFs: RF1
--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id]
----------PhysicalOlapScan[t] apply RFs: RF0
----------filter((t1.score > 10))
------------PhysicalOlapScan[t]

-- !multiple_right_outer_2 --
PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=() build RFs:RF1 id->[id]
--------PhysicalOlapScan[t] apply RFs: RF1
--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id]
----------PhysicalOlapScan[t] apply RFs: RF0
----------filter((t2.score > 10))
------------PhysicalOlapScan[t]

-- !multiple_full_outer_1 --
PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id))otherCondition=()
------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=()
--------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id]
----------PhysicalOlapScan[t] apply RFs: RF0
----------filter((t1.score > 10))
------------PhysicalOlapScan[t]
--------PhysicalOlapScan[t]

-- !multiple_full_outer_2 --
PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=()
--------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id]
----------PhysicalOlapScan[t] apply RFs: RF0
----------filter((t2.score > 10))
------------PhysicalOlapScan[t]
--------PhysicalDistribute
----------PhysicalOlapScan[t]

-- !left_outer_join_non_null_assertion --
PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id]
--------PhysicalOlapScan[t] apply RFs: RF0
--------filter(( not id IS NULL) and (t1.score > 5))
----------PhysicalOlapScan[t]

-- !right_outer_join_non_null_assertion --
PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id))otherCondition=()
--------PhysicalOlapScan[t]
------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id]
--------PhysicalOlapScan[t] apply RFs: RF0
--------filter(( not id IS NULL) and (t2.score > 5))
----------PhysicalOlapScan[t]

Expand All @@ -100,17 +145,17 @@ PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------filter(((t1.score > 5) OR (t2.score > 5)))
--------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id))otherCondition=()
--------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
----------PhysicalOlapScan[t]
----------PhysicalOlapScan[t]

-- !multiple_joins_complex_conditions --
PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id))otherCondition=()
--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id))otherCondition=()
----------PhysicalOlapScan[t]
------hashJoin[INNER_JOIN] hashCondition=((t2.id = t3.id)) otherCondition=() build RFs:RF1 id->[id]
--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id]
----------PhysicalOlapScan[t] apply RFs: RF0 RF1
----------filter((t1.score > 5))
------------PhysicalOlapScan[t]
--------filter(( not score IS NULL))
Expand All @@ -120,7 +165,7 @@ PhysicalResultSink
PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------hashJoin[LEFT_OUTER_JOIN] hashCondition=((expr_cast(score as BIGINT) = expr_(score + 10)))otherCondition=()
------hashJoin[LEFT_OUTER_JOIN] hashCondition=((expr_cast(score as BIGINT) = expr_(score + 10))) otherCondition=()
--------PhysicalProject
----------filter(( not id IS NULL))
------------PhysicalOlapScan[t]
Expand All @@ -134,7 +179,7 @@ PhysicalResultSink
----PhysicalProject
------filter((count(id) > 1))
--------hashAgg[LOCAL]
----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id))otherCondition=()
----------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
------------PhysicalProject
--------------PhysicalOlapScan[t]
------------PhysicalProject
Expand All @@ -144,7 +189,7 @@ PhysicalResultSink
PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id))otherCondition=()
------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
--------filter(( not id IS NULL))
----------PhysicalOlapScan[t]
--------PhysicalProject
Expand All @@ -154,18 +199,38 @@ PhysicalResultSink
PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id))otherCondition=()
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id]
--------filter(( not name IS NULL))
----------PhysicalOlapScan[t] apply RFs: RF0
--------filter((t1.score > 10))
----------PhysicalOlapScan[t]

-- !right_outer --
PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id]
--------filter(( not name IS NULL))
----------PhysicalOlapScan[t] apply RFs: RF0
--------filter((t1.score > 10))
----------PhysicalOlapScan[t]

-- !full_outer --
PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id]
--------filter(( not name IS NULL))
----------PhysicalOlapScan[t] apply RFs: RF0
--------filter((t1.score > 10))
----------PhysicalOlapScan[t]

-- !self_left_outer --
PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t1_alias.id))otherCondition=()
--------PhysicalOlapScan[t]
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t1_alias.id)) otherCondition=() build RFs:RF0 id->[id]
--------PhysicalOlapScan[t] apply RFs: RF0
--------filter((t1_alias.name > '2023-01-01'))
----------PhysicalOlapScan[t]

Expand All @@ -174,7 +239,7 @@ PhysicalResultSink
--PhysicalDistribute
----hashAgg[LOCAL]
------PhysicalProject
--------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id))otherCondition=()
--------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
----------PhysicalProject
------------PhysicalOlapScan[t]
----------PhysicalProject
Expand All @@ -185,9 +250,9 @@ PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------filter(name IS NULL)
--------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t3.id))otherCondition=()
--------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t3.id)) otherCondition=()
----------PhysicalDistribute
------------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id))otherCondition=()
------------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
--------------PhysicalOlapScan[t]
--------------PhysicalOlapScan[t]
----------PhysicalDistribute
Expand All @@ -197,8 +262,8 @@ PhysicalResultSink
PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id))otherCondition=()
--------PhysicalOlapScan[t]
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id]
--------PhysicalOlapScan[t] apply RFs: RF0
--------PhysicalProject
----------filter((t2.score > 20))
------------PhysicalOlapScan[t]
Expand All @@ -207,7 +272,7 @@ PhysicalResultSink
PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------hashJoin[INNER_JOIN] hashCondition=((expr_cast(score as BIGINT) = expr_(score * 2)))otherCondition=((t1.id < t2.id))
------hashJoin[INNER_JOIN] hashCondition=((expr_cast(score as BIGINT) = expr_(score * 2))) otherCondition=((t1.id < t2.id))
--------PhysicalProject
----------PhysicalOlapScan[t]
--------PhysicalDistribute
Expand All @@ -221,7 +286,7 @@ PhysicalResultSink
------PhysicalWindow
--------PhysicalQuickSort[LOCAL_SORT]
----------PhysicalDistribute
------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id))otherCondition=()
------------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
--------------PhysicalProject
----------------PhysicalOlapScan[t]
--------------PhysicalProject
Expand All @@ -231,8 +296,8 @@ PhysicalResultSink
PhysicalResultSink
--PhysicalDistribute
----PhysicalProject
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id))otherCondition=()
--------PhysicalOlapScan[t]
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() build RFs:RF0 id->[id]
--------PhysicalOlapScan[t] apply RFs: RF0
--------filter(( not name IS NULL))
----------PhysicalOlapScan[t]

Loading

0 comments on commit 879acca

Please sign in to comment.