Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BugFix] fix unstable tests of array_agg #30318

Merged
merged 1 commit into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions test/sql/test_agg_function/R/test_array_agg
Original file line number Diff line number Diff line change
Expand Up @@ -409,16 +409,6 @@ select array_agg(name order by score,4,1), count(distinct id), max(score) from
-- result:
E: (1064, 'Getting syntax error from line 1, column 7 to line 1, column 40. Detail message: ORDER BY position 4 is not in array_agg output list.')
-- !result
select array_agg(subject order by score,4.00), count(distinct id), max(score) from ss group by id order by 1;
-- result:
[null] 1 None
[null,"数学大不列颠","English"] 1 98
[null,"物理Phy"] 0 99
["English",null,"语文北京上海"] 1 22
["Math","English"] 1 90
["Math数学欧拉方程","英文English"] 1 98
["英语外语美誉"] 1 None
-- !result
select cardinality(array_agg( name order by score,4.00)), cardinality(array_agg(distinct name order by score,4.00)) from ss group by id order by 1;
-- result:
1 1
Expand Down Expand Up @@ -557,10 +547,6 @@ select array_agg(name order by score,4,1), count(distinct id), max(score) from
-- result:
E: (1064, 'Getting syntax error from line 1, column 7 to line 1, column 40. Detail message: ORDER BY position 4 is not in array_agg output list.')
-- !result
select array_agg(subject order by score,4.00), count(distinct id), max(score) from ss order by 1;
-- result:
[null,null,null,"数学大不列颠","英语外语美誉",null,"English","语文北京上海","Math数学欧拉方程","Math","English","英文English","English","物理Phy"] 6 99
-- !result
select array_agg( name order by score,4.00),array_agg(distinct name order by score,4.00) from ss order by 1;
-- result:
["李四大闹天空",null,null,"欧阳诸葛方程","May","Tom","Tom","王武程咬金","张三掩耳盗铃","Tom","Tom","张三此地无银三百两","Ti","Ti"] ["李四大闹天空",null,"欧阳诸葛方程","May","Tom","王武程咬金","张三掩耳盗铃","张三此地无银三百两","Ti"]
Expand Down Expand Up @@ -798,16 +784,6 @@ select array_agg(name order by score,4,1), count(distinct id), max(score) from
-- result:
E: (1064, 'Getting syntax error from line 1, column 7 to line 1, column 40. Detail message: ORDER BY position 4 is not in array_agg output list.')
-- !result
select array_agg(subject order by score,4.00), count(distinct id), max(score) from ss group by id order by 1;
-- result:
[null] 1 None
[null,"数学大不列颠","English"] 1 98
[null,"物理Phy"] 0 99
["English",null,"语文北京上海"] 1 22
["Math","English"] 1 90
["Math数学欧拉方程","英文English"] 1 98
["英语外语美誉"] 1 None
-- !result
select cardinality(array_agg( name order by score,4.00)), cardinality(array_agg(distinct name order by score,4.00)) from ss group by id order by 1;
-- result:
1 1
Expand Down Expand Up @@ -946,10 +922,6 @@ select array_agg(name order by score,4,1), count(distinct id), max(score) from
-- result:
E: (1064, 'Getting syntax error from line 1, column 7 to line 1, column 40. Detail message: ORDER BY position 4 is not in array_agg output list.')
-- !result
select array_agg(subject order by score,4.00), count(distinct id), max(score) from ss order by 1;
-- result:
["英语外语美誉",null,"数学大不列颠",null,"English",null,null,"语文北京上海","Math数学欧拉方程","Math","English","English","英文English","物理Phy"] 6 99
-- !result
select array_agg( name order by score,4.00),array_agg(distinct name order by score,4.00) from ss order by 1;
-- result:
["李四大闹天空","May","Tom","Tom",null,null,"欧阳诸葛方程","王武程咬金","张三掩耳盗铃","Tom","Tom","Ti","张三此地无银三百两","Ti"] ["李四大闹天空","May","Tom","欧阳诸葛方程",null,"王武程咬金","张三掩耳盗铃","Ti","张三此地无银三百两"]
Expand Down Expand Up @@ -1190,16 +1162,6 @@ select array_agg(name order by score,4,1), count(distinct id), max(score) from
-- result:
E: (1064, 'Getting syntax error from line 1, column 7 to line 1, column 40. Detail message: ORDER BY position 4 is not in array_agg output list.')
-- !result
select array_agg(subject order by score,4.00), count(distinct id), max(score) from ss group by id order by 1;
-- result:
[null] 1 None
[null,"数学大不列颠","English"] 1 98
[null,"物理Phy"] 0 99
["English",null,"语文北京上海"] 1 22
["Math","English"] 1 90
["Math数学欧拉方程","英文English"] 1 98
["英语外语美誉"] 1 None
-- !result
select cardinality(array_agg( name order by score,4.00)), cardinality(array_agg(distinct name order by score,4.00)) from ss group by id order by 1;
-- result:
1 1
Expand Down Expand Up @@ -1338,10 +1300,6 @@ select array_agg(name order by score,4,1), count(distinct id), max(score) from
-- result:
E: (1064, 'Getting syntax error from line 1, column 7 to line 1, column 40. Detail message: ORDER BY position 4 is not in array_agg output list.')
-- !result
select array_agg(subject order by score,4.00), count(distinct id), max(score) from ss order by 1;
-- result:
[null,null,"数学大不列颠",null,null,"英语外语美誉","English","语文北京上海","Math数学欧拉方程","Math","English","English","英文English","物理Phy"] 6 99
-- !result
select array_agg( name order by score,4.00),array_agg(distinct name order by score,4.00) from ss order by 1;
-- result:
[null,"Tom","Tom",null,"李四大闹天空","欧阳诸葛方程","May","王武程咬金","张三掩耳盗铃","Tom","Tom","Ti","张三此地无银三百两","Ti"] [null,"Tom","李四大闹天空","欧阳诸葛方程","May","王武程咬金","张三掩耳盗铃","Ti","张三此地无银三百两"]
Expand Down
6 changes: 0 additions & 6 deletions test/sql/test_agg_function/T/test_array_agg
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ select group_concat( name,subject order by 1,2), array_agg(distinct id order by
select array_agg( name order by 1,score), count(distinct id), max(score) from ss group by id order by 1;
select array_agg( subject order by score,1), count(distinct id), max(score) from ss group by id order by 1;
select array_agg(name order by score,4,1), count(distinct id), max(score) from ss group by id order by 1;
select array_agg(subject order by score,4.00), count(distinct id), max(score) from ss group by id order by 1;
select cardinality(array_agg( name order by score,4.00)), cardinality(array_agg(distinct name order by score,4.00)) from ss group by id order by 1;
select array_agg( null order by score,4.00) from ss group by id order by 1;
select array_agg( score order by 1) from ss group by id order by 1;
Expand Down Expand Up @@ -113,7 +112,6 @@ select group_concat(name,subject order by 1,2), array_agg(distinct id order by 1
select array_agg( name order by 1,score), count(distinct id), max(score) from ss order by 1;
select array_agg( subject order by score,1), count(distinct id), max(score) from ss order by 1;
select array_agg(name order by score,4,1), count(distinct id), max(score) from ss order by 1;
select array_agg(subject order by score,4.00), count(distinct id), max(score) from ss order by 1;
select array_agg( name order by score,4.00),array_agg(distinct name order by score,4.00) from ss order by 1;
select array_agg( null order by score,4.00) from ss order by 1;
select array_agg( score order by 1) from ss order by 1;
Expand Down Expand Up @@ -143,7 +141,6 @@ select group_concat( name,subject order by 1,2), array_agg(distinct id order by
select array_agg( name order by 1,score), count(distinct id), max(score) from ss group by id order by 1;
select array_agg( subject order by score,1), count(distinct id), max(score) from ss group by id order by 1;
select array_agg(name order by score,4,1), count(distinct id), max(score) from ss group by id order by 1;
select array_agg(subject order by score,4.00), count(distinct id), max(score) from ss group by id order by 1;
select cardinality(array_agg( name order by score,4.00)), cardinality(array_agg(distinct name order by score,4.00)) from ss group by id order by 1;
select array_agg( null order by score,4.00) from ss group by id order by 1;
select array_agg( score order by 1) from ss group by id order by 1;
Expand Down Expand Up @@ -173,7 +170,6 @@ select group_concat(name,subject order by 1,2), array_agg(distinct id order by 1
select array_agg( name order by 1,score), count(distinct id), max(score) from ss order by 1;
select array_agg( subject order by score,1), count(distinct id), max(score) from ss order by 1;
select array_agg(name order by score,4,1), count(distinct id), max(score) from ss order by 1;
select array_agg(subject order by score,4.00), count(distinct id), max(score) from ss order by 1;
select array_agg( name order by score,4.00),array_agg(distinct name order by score,4.00) from ss order by 1;
select array_agg( null order by score,4.00) from ss order by 1;
select array_agg( score order by 1) from ss order by 1;
Expand Down Expand Up @@ -204,7 +200,6 @@ select group_concat( name,subject order by 1,2), array_agg(distinct id order by
select array_agg( name order by 1,score), count(distinct id), max(score) from ss group by id order by 1;
select array_agg( subject order by score,1), count(distinct id), max(score) from ss group by id order by 1;
select array_agg(name order by score,4,1), count(distinct id), max(score) from ss group by id order by 1;
select array_agg(subject order by score,4.00), count(distinct id), max(score) from ss group by id order by 1;
select cardinality(array_agg( name order by score,4.00)), cardinality(array_agg(distinct name order by score,4.00)) from ss group by id order by 1;
select array_agg( null order by score,4.00) from ss group by id order by 1;
select array_agg( score order by 1) from ss group by id order by 1;
Expand Down Expand Up @@ -234,7 +229,6 @@ select group_concat(name,subject order by 1,2), array_agg(distinct id order by 1
select array_agg( name order by 1,score), count(distinct id), max(score) from ss order by 1;
select array_agg( subject order by score,1), count(distinct id), max(score) from ss order by 1;
select array_agg(name order by score,4,1), count(distinct id), max(score) from ss order by 1;
select array_agg(subject order by score,4.00), count(distinct id), max(score) from ss order by 1;
select array_agg( name order by score,4.00),array_agg(distinct name order by score,4.00) from ss order by 1;
select array_agg( null order by score,4.00) from ss order by 1;
select array_agg( score order by 1) from ss order by 1;
Expand Down