Skip to content

Commit

Permalink
add regression
Browse files Browse the repository at this point in the history
  • Loading branch information
feiniaofeiafei committed Jan 3, 2025
1 parent 6e90731 commit 9a3ea70
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -561,5 +561,32 @@ abbbb
-- !union_child_and_const_exprs_orpredicates_res --
1 d2

-- !intersect_with_hint_infer_set_operator_distinct_and_do_eliminate_gby_key_by_uniform --
1 d2

-- !intersect_with_hint_infer_set_operator_distinct_and_do_eliminate_gby_key_by_uniform_shape --
PhysicalResultSink
--PhysicalQuickSort[MERGE_SORT]
----PhysicalQuickSort[LOCAL_SORT]
------hashJoin[INNER_JOIN] hashCondition=((t3.a = t.a) and (t3.b = t.b)) otherCondition=()
--------PhysicalIntersect
----------filter((a = 1))
------------hashAgg[GLOBAL]
--------------hashAgg[LOCAL]
----------------filter((test_pull_up_predicate_set_op1.b > 'ab'))
------------------PhysicalOlapScan[test_pull_up_predicate_set_op1]
----------filter((test_pull_up_predicate_set_op2.a = 1))
------------hashAgg[GLOBAL]
--------------hashAgg[LOCAL]
----------------filter((test_pull_up_predicate_set_op2.a = 1) and (test_pull_up_predicate_set_op2.b > 'ab'))
------------------PhysicalOlapScan[test_pull_up_predicate_set_op2]
--------filter((t3.a = 1) and (t3.b > 'ab'))
----------PhysicalOlapScan[test_pull_up_predicate_set_op3]

Hint log:
Used: use_INFER_SET_OPERATOR_DISTINCT
UnUsed:
SyntaxError:

-- !test --

Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,14 @@ suite("pull_up_predicate_set_op") {
select t.a,t3.b from (select a,b from test_pull_up_predicate_set_op1 where a in (1,2) or b in ('2d','3') union select 2,'2d' union select 2,'3') t inner join test_pull_up_predicate_set_op3 t3
on t3.a=t.a and t3.b=t.b order by 1,2;"""

qt_intersect_with_hint_infer_set_operator_distinct_and_do_eliminate_gby_key_by_uniform """
select /*+use_cbo_rule(INFER_SET_OPERATOR_DISTINCT)*/ t.a,t3.b from (select 1 as a,b from test_pull_up_predicate_set_op1 intersect select a,b from test_pull_up_predicate_set_op2 where b>'ab') t inner join test_pull_up_predicate_set_op3 t3
on t3.a=t.a and t3.b=t.b order by 1,2;
"""
qt_intersect_with_hint_infer_set_operator_distinct_and_do_eliminate_gby_key_by_uniform_shape """
explain shape plan select /*+use_cbo_rule(INFER_SET_OPERATOR_DISTINCT)*/ t.a,t3.b from (select 1 as a,b from test_pull_up_predicate_set_op1 intersect select a,b from test_pull_up_predicate_set_op2 where b>'ab') t inner join test_pull_up_predicate_set_op3 t3
on t3.a=t.a and t3.b=t.b order by 1,2;
"""

sql """
drop table if exists table_1_undef_partitions2_keys3_properties4_distributed_by52;
Expand Down

0 comments on commit 9a3ea70

Please sign in to comment.