diff --git a/dbms/tests/queries/0_stateless/00198_group_by_empty_arrays.reference b/dbms/tests/queries/0_stateless/00198_group_by_empty_arrays.reference index 0e1aece238e..74ce7d8f0ed 100644 --- a/dbms/tests/queries/0_stateless/00198_group_by_empty_arrays.reference +++ b/dbms/tests/queries/0_stateless/00198_group_by_empty_arrays.reference @@ -4,3 +4,20 @@ [0,1,2,3,4] 1 [0,1,2,3,4,5,6] 1 [0,1,2,3,4,5,6,7,8] 1 +[] [] 4 +[] [0,1,2,3] 1 +[] [0,1,2,3,4,5] 1 +[] [0,1,2,3,4,5,6,7,8,9] 1 +[] [0,1,2,3,4,5,6,7,8,9,10,11] 1 +[] [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] 1 +[] [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17] 1 +[0] [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18] 1 +[0,1,2] [] 1 +[0,1,2,3,4] [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14] 1 +[0,1,2,3,4,5,6] [0,1,2,3,4,5,6,7,8,9,10,11,12] 1 +[0,1,2,3,4,5,6,7,8] [] 1 +[0,1,2,3,4,5,6,7,8,9,10] [0,1,2,3,4,5,6,7,8] 1 +[0,1,2,3,4,5,6,7,8,9,10,11,12] [0,1,2,3,4,5,6] 1 +[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14] [] 1 +[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16] [0,1,2] 1 +[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18] [0] 1 diff --git a/dbms/tests/queries/0_stateless/00198_group_by_empty_arrays.sql b/dbms/tests/queries/0_stateless/00198_group_by_empty_arrays.sql index 704ff58e96b..690fe7b437e 100644 --- a/dbms/tests/queries/0_stateless/00198_group_by_empty_arrays.sql +++ b/dbms/tests/queries/0_stateless/00198_group_by_empty_arrays.sql @@ -1 +1,2 @@ SELECT range(x) AS k, count() FROM (SELECT number % 2 ? number : 0 AS x FROM system.numbers LIMIT 10) GROUP BY k ORDER BY k; +SELECT range(x) AS k1, range(y) AS k2, count() FROM (SELECT number % 2 ? number : 0 AS x, number % 3 ? toUInt64(20 - number) : 0 AS y FROM system.numbers LIMIT 20) GROUP BY k1, k2 ORDER BY k1, k2;