Skip to content

Commit

Permalink
[opt](nereids) support pushdown agg distinct through join
Browse files Browse the repository at this point in the history
  • Loading branch information
xzj7019 committed Dec 2, 2024
1 parent adde6b6 commit 5e048db
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
-- This file is automatically generated. You should know what you did if you want to edit this
-- !shape --
PhysicalResultSink
--hashAgg[GLOBAL]
----hashAgg[LOCAL]
------hashAgg[GLOBAL]
--------hashAgg[LOCAL]
----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=()
------------hashAgg[GLOBAL]
--------------hashAgg[LOCAL]
----------------PhysicalOlapScan[count_with_distinct_t]
------------PhysicalOlapScan[count_with_distinct_t]

Hint log:
Used: use_PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE
UnUsed:
SyntaxError:

-- !groupby_pushdown_basic --
1
1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ suite("push_down_count_distinct_through_join_one_side") {
sql "insert into count_with_distinct_t values (9, 3, null)"
sql "insert into count_with_distinct_t values (10, null, null)"
sql "analyze table count_with_distinct_t with sync;"
qt_shape """
explain shape plan select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1, count_with_distinct_t t2 where t1.id = t2.id group by t1.name;
"""
order_qt_groupby_pushdown_basic """
select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1, count_with_distinct_t t2 where t1.id = t2.id group by t1.name;
"""
Expand Down

0 comments on commit 5e048db

Please sign in to comment.