Skip to content

Commit

Permalink
fix-agg-phase
Browse files Browse the repository at this point in the history
  • Loading branch information
englefly committed Aug 8, 2024
1 parent f92413f commit 8649ffd
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,13 @@ PhysicalResultSink

-- !groupby_pushdown_multi_table_join --
PhysicalResultSink
--hashAgg[LOCAL]
----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
--------PhysicalOlapScan[min_t]
--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]
--------PhysicalOlapScan[min_t]
------PhysicalOlapScan[min_t]

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

-- !with_hint_groupby_pushdown_multi_table_join --
PhysicalResultSink
--hashAgg[LOCAL]
----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
--------PhysicalOlapScan[min_t]
--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]
--------PhysicalOlapScan[min_t]
------PhysicalOlapScan[min_t]

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

-- !groupby_pushdown_multi_table_join --
PhysicalResultSink
--hashAgg[LOCAL]
----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
--------PhysicalOlapScan[sum_t]
--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]
--------PhysicalOlapScan[sum_t]
------PhysicalOlapScan[sum_t]

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

-- !with_hint_groupby_pushdown_multi_table_join --
PhysicalResultSink
--hashAgg[LOCAL]
----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=()
------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
--------PhysicalOlapScan[sum_t]
--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]
--------PhysicalOlapScan[sum_t]
------PhysicalOlapScan[sum_t]

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

-- !groupby_pushdown_multi_table_join --
PhysicalResultSink
--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]
--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]
--------PhysicalOlapScan[sum_t_one_side]
------PhysicalOlapScan[sum_t_one_side]

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

-- !with_hint_groupby_pushdown_multi_table_join --
PhysicalResultSink
--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]
--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]
--------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 @@ -21,7 +21,7 @@ suite("push_down_count_through_join_one_side") {
sql 'set be_number_for_test=3'
sql "SET enable_fallback_to_original_planner=false"
sql "SET ignore_shape_nodes='PhysicalDistribute,PhysicalProject'"

sql "set DISABLE_NEREIDS_RULES='ONE_PHASE_AGGREGATE_WITHOUT_DISTINCT, ONE_PHASE_AGGREGATE_SINGLE_DISTINCT_TO_MULTI'"
sql """
DROP TABLE IF EXISTS count_t_one_side;
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ suite("push_down_max_through_join") {
sql "set runtime_filter_mode=OFF"
sql "SET enable_fallback_to_original_planner=false"
sql "SET ignore_shape_nodes='PhysicalDistribute,PhysicalProject'"
sql "set DISABLE_NEREIDS_RULES='ONE_PHASE_AGGREGATE_WITHOUT_DISTINCT, ONE_PHASE_AGGREGATE_SINGLE_DISTINCT_TO_MULTI'"

sql """
DROP TABLE IF EXISTS max_t;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ suite("push_down_min_through_join") {
sql "set runtime_filter_mode=OFF"
sql "SET enable_fallback_to_original_planner=false"
sql "SET ignore_shape_nodes='PhysicalDistribute,PhysicalProject'"
sql "set DISABLE_NEREIDS_RULES='ONE_PHASE_AGGREGATE_WITHOUT_DISTINCT, ONE_PHASE_AGGREGATE_SINGLE_DISTINCT_TO_MULTI'"

sql """
DROP TABLE IF EXISTS min_t;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ suite("push_down_sum_through_join") {
sql "set runtime_filter_mode=OFF"
sql "SET enable_fallback_to_original_planner=false"
sql "SET ignore_shape_nodes='PhysicalDistribute,PhysicalProject'"
sql "set DISABLE_NEREIDS_RULES='ONE_PHASE_AGGREGATE_WITHOUT_DISTINCT, ONE_PHASE_AGGREGATE_SINGLE_DISTINCT_TO_MULTI'"

sql """
DROP TABLE IF EXISTS sum_t;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ suite("push_down_sum_through_join_one_side") {
sql "set runtime_filter_mode=OFF"
sql "SET enable_fallback_to_original_planner=false"
sql "SET ignore_shape_nodes='PhysicalDistribute,PhysicalProject'"
sql "set DISABLE_NEREIDS_RULES='ONE_PHASE_AGGREGATE_WITHOUT_DISTINCT, ONE_PHASE_AGGREGATE_SINGLE_DISTINCT_TO_MULTI'"

sql """
DROP TABLE IF EXISTS sum_t_one_side;
Expand Down

0 comments on commit 8649ffd

Please sign in to comment.