Skip to content

Commit

Permalink
update regression case for eager-agg
Browse files Browse the repository at this point in the history
  • Loading branch information
englefly committed Aug 7, 2024
1 parent 4f08995 commit 4fa0e30
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 80 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,14 @@ PhysicalResultSink
--------PhysicalOlapScan[count_t]
--------PhysicalOlapScan[count_t]

-- !groupby_pushdown_multi_table_join --
-- !groupby_pushdown_multi_table_join_1 --
PhysicalResultSink
--hashAgg[GLOBAL]
----hashAgg[LOCAL]
------hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
----------PhysicalOlapScan[count_t]
----------PhysicalOlapScan[count_t]
--hashAgg[LOCAL]
----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
--------PhysicalOlapScan[count_t]
--------PhysicalOlapScan[count_t]
------PhysicalOlapScan[count_t]

-- !groupby_pushdown_with_order_by --
PhysicalResultSink
Expand Down Expand Up @@ -318,15 +317,14 @@ PhysicalResultSink
----------PhysicalOlapScan[count_t]
----------PhysicalOlapScan[count_t]

-- !groupby_pushdown_multi_table_join --
-- !groupby_pushdown_multi_table_join_2 --
PhysicalResultSink
--hashAgg[GLOBAL]
----hashAgg[LOCAL]
------hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
----------PhysicalOlapScan[count_t]
----------PhysicalOlapScan[count_t]
--hashAgg[LOCAL]
----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
--------PhysicalOlapScan[count_t]
--------PhysicalOlapScan[count_t]
------PhysicalOlapScan[count_t]

-- !groupby_pushdown_with_order_by --
PhysicalResultSink
Expand Down Expand Up @@ -571,15 +569,14 @@ Used:
UnUsed: use_push_down_agg_through_join
SyntaxError:

-- !with_hint_groupby_pushdown_multi_table_join --
-- !with_hint_groupby_pushdown_multi_table_join_1 --
PhysicalResultSink
--hashAgg[GLOBAL]
----hashAgg[LOCAL]
------hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
----------PhysicalOlapScan[count_t]
----------PhysicalOlapScan[count_t]
--hashAgg[LOCAL]
----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
--------PhysicalOlapScan[count_t]
--------PhysicalOlapScan[count_t]
------PhysicalOlapScan[count_t]

Hint log:
Used:
Expand Down Expand Up @@ -908,15 +905,14 @@ Used:
UnUsed: use_push_down_agg_through_join
SyntaxError:

-- !with_hint_groupby_pushdown_multi_table_join --
-- !with_hint_groupby_pushdown_multi_table_join_2 --
PhysicalResultSink
--hashAgg[GLOBAL]
----hashAgg[LOCAL]
------hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
----------PhysicalOlapScan[count_t]
----------PhysicalOlapScan[count_t]
--hashAgg[LOCAL]
----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
--------PhysicalOlapScan[count_t]
--------PhysicalOlapScan[count_t]
------PhysicalOlapScan[count_t]

Hint log:
Used:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,12 @@ PhysicalResultSink

-- !groupby_pushdown_multi_table_join --
PhysicalResultSink
--hashAgg[GLOBAL]
----hashAgg[LOCAL]
------hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
----------PhysicalOlapScan[max_t]
----------PhysicalOlapScan[max_t]
--hashAgg[LOCAL]
----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
--------PhysicalOlapScan[max_t]
--------PhysicalOlapScan[max_t]
------PhysicalOlapScan[max_t]

-- !groupby_pushdown_with_order_by --
PhysicalResultSink
Expand Down Expand Up @@ -393,13 +392,12 @@ SyntaxError:

-- !with_hint_groupby_pushdown_multi_table_join --
PhysicalResultSink
--hashAgg[GLOBAL]
----hashAgg[LOCAL]
------hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
----------PhysicalOlapScan[max_t]
----------PhysicalOlapScan[max_t]
--hashAgg[LOCAL]
----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
--------PhysicalOlapScan[max_t]
--------PhysicalOlapScan[max_t]
------PhysicalOlapScan[max_t]

Hint log:
Used:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,12 @@ PhysicalResultSink

-- !groupby_pushdown_multi_table_join --
PhysicalResultSink
--hashAgg[GLOBAL]
----hashAgg[LOCAL]
------hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
----------PhysicalOlapScan[min_t]
----------PhysicalOlapScan[min_t]
--hashAgg[LOCAL]
----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
--------PhysicalOlapScan[min_t]
--------PhysicalOlapScan[min_t]
------PhysicalOlapScan[min_t]

-- !groupby_pushdown_with_order_by --
PhysicalResultSink
Expand Down Expand Up @@ -393,13 +392,12 @@ SyntaxError:

-- !with_hint_groupby_pushdown_multi_table_join --
PhysicalResultSink
--hashAgg[GLOBAL]
----hashAgg[LOCAL]
------hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
----------PhysicalOlapScan[min_t]
----------PhysicalOlapScan[min_t]
--hashAgg[LOCAL]
----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
--------PhysicalOlapScan[min_t]
--------PhysicalOlapScan[min_t]
------PhysicalOlapScan[min_t]

Hint log:
Used:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,12 @@ PhysicalResultSink

-- !groupby_pushdown_multi_table_join --
PhysicalResultSink
--hashAgg[GLOBAL]
----hashAgg[LOCAL]
------hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
----------PhysicalOlapScan[sum_t]
----------PhysicalOlapScan[sum_t]
--hashAgg[LOCAL]
----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
--------PhysicalOlapScan[sum_t]
--------PhysicalOlapScan[sum_t]
------PhysicalOlapScan[sum_t]

-- !groupby_pushdown_with_order_by --
PhysicalResultSink
Expand Down Expand Up @@ -393,13 +392,12 @@ SyntaxError:

-- !with_hint_groupby_pushdown_multi_table_join --
PhysicalResultSink
--hashAgg[GLOBAL]
----hashAgg[LOCAL]
------hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
----------PhysicalOlapScan[sum_t]
----------PhysicalOlapScan[sum_t]
--hashAgg[LOCAL]
----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
--------PhysicalOlapScan[sum_t]
--------PhysicalOlapScan[sum_t]
------PhysicalOlapScan[sum_t]

Hint log:
Used:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,12 @@ PhysicalResultSink

-- !groupby_pushdown_multi_table_join --
PhysicalResultSink
--hashAgg[GLOBAL]
----hashAgg[LOCAL]
------hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
----------PhysicalOlapScan[sum_t_one_side]
----------PhysicalOlapScan[sum_t_one_side]
--hashAgg[LOCAL]
----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
--------PhysicalOlapScan[sum_t_one_side]
--------PhysicalOlapScan[sum_t_one_side]
------PhysicalOlapScan[sum_t_one_side]

-- !groupby_pushdown_with_order_by --
PhysicalResultSink
Expand Down Expand Up @@ -393,13 +392,12 @@ SyntaxError:

-- !with_hint_groupby_pushdown_multi_table_join --
PhysicalResultSink
--hashAgg[GLOBAL]
----hashAgg[LOCAL]
------hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
--------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
----------PhysicalOlapScan[sum_t_one_side]
----------PhysicalOlapScan[sum_t_one_side]
--hashAgg[LOCAL]
----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
--------PhysicalOlapScan[sum_t_one_side]
--------PhysicalOlapScan[sum_t_one_side]
------PhysicalOlapScan[sum_t_one_side]

Hint log:
Used:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ suite("push_down_count_through_join") {
explain shape plan select count(t1.score), count(*), max(t1.score) from count_t t1 join count_t t2 on t1.id = t2.id group by t1.name;
"""

qt_groupby_pushdown_multi_table_join """
qt_groupby_pushdown_multi_table_join_1 """
explain shape plan select count(t1.score) from count_t t1 join count_t t2 on t1.id = t2.id join count_t t3 on t1.name = t3.name group by t1.name;
"""

Expand Down Expand Up @@ -201,7 +201,7 @@ suite("push_down_count_through_join") {
explain shape plan select count(*) from count_t t1, count_t t2 where t1.id = t2.id group by t1.name having count(*) > 100;
"""

qt_groupby_pushdown_multi_table_join """
qt_groupby_pushdown_multi_table_join_2 """
explain shape plan select count(*) from count_t t1 join count_t t2 on t1.id = t2.id join count_t t3 on t1.name = t3.name group by t1.name;
"""

Expand Down Expand Up @@ -289,7 +289,7 @@ suite("push_down_count_through_join") {
explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(t1.score), count(*), max(t1.score) from count_t t1 join count_t t2 on t1.id = t2.id group by t1.name;
"""

qt_with_hint_groupby_pushdown_multi_table_join """
qt_with_hint_groupby_pushdown_multi_table_join_1 """
explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(t1.score) from count_t t1 join count_t t2 on t1.id = t2.id join count_t t3 on t1.name = t3.name group by t1.name;
"""

Expand Down Expand Up @@ -390,7 +390,7 @@ suite("push_down_count_through_join") {
explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(*) from count_t t1, count_t t2 where t1.id = t2.id group by t1.name having count(*) > 100;
"""

qt_with_hint_groupby_pushdown_multi_table_join """
qt_with_hint_groupby_pushdown_multi_table_join_2 """
explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(*) from count_t t1 join count_t t2 on t1.id = t2.id join count_t t3 on t1.name = t3.name group by t1.name;
"""

Expand Down

0 comments on commit 4fa0e30

Please sign in to comment.