Skip to content

Commit

Permalink
add regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
feiniaofeiafei committed Jun 5, 2024
1 parent b066e2e commit 7583d95
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,3 +326,39 @@ PhysicalResultSink
--------------------filter((mal_test_push_count.a = 1))
----------------------PhysicalOlapScan[mal_test_push_count]

-- !test_upper_refer_count_star --
1 10
2 2
3 6
4 2
5 10
7 2

-- !test_upper_refer_count_star_shape --
PhysicalResultSink
--PhysicalQuickSort[MERGE_SORT]
----PhysicalDistribute[DistributionSpecGather]
------PhysicalQuickSort[LOCAL_SORT]
--------hashAgg[GLOBAL]
----------PhysicalDistribute[DistributionSpecHash]
------------hashAgg[LOCAL]
--------------PhysicalUnion
----------------hashAgg[GLOBAL]
------------------PhysicalDistribute[DistributionSpecHash]
--------------------hashAgg[LOCAL]
----------------------PhysicalProject
------------------------filter((mal_test_push_count.a > 1))
--------------------------PhysicalOlapScan[mal_test_push_count]
----------------hashAgg[GLOBAL]
------------------PhysicalDistribute[DistributionSpecHash]
--------------------hashAgg[LOCAL]
----------------------PhysicalProject
------------------------filter((mal_test_push_count.a < 100))
--------------------------PhysicalOlapScan[mal_test_push_count]
----------------hashAgg[GLOBAL]
------------------PhysicalDistribute[DistributionSpecHash]
--------------------hashAgg[LOCAL]
----------------------PhysicalProject
------------------------filter((mal_test_push_count.a = 1))
--------------------------PhysicalOlapScan[mal_test_push_count]

Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,15 @@ suite("push_count_into_union_all") {
explain shape plan
select a,count(b) c1,sum(b) from (select a,b from mal_test_push_count where a>1 union all select a,b from mal_test_push_count where a<100
union all select a,b from mal_test_push_count where a=1 ) t group by a order by 1,2,3;"""

qt_test_upper_refer_count_star """
select a,c1 from (
select a,count(*) c1 from (select a,b from mal_test_push_count where a>1 union all select a,b from mal_test_push_count where a<100
union all select a,b from mal_test_push_count where a=1 ) t group by a) outer_table order by 1,2;"""

qt_test_upper_refer_count_star_shape """
explain shape plan
select a,c1 from (
select a,count(*) c1 from (select a,b from mal_test_push_count where a>1 union all select a,b from mal_test_push_count where a<100
union all select a,b from mal_test_push_count where a=1 ) t group by a) outer_table order by 1,2;"""
}

0 comments on commit 7583d95

Please sign in to comment.