ForEach combinator of aggregate functions: more tests [#CLICKHOUSE-2952].

This commit is contained in:
Alexey Milovidov 2017-04-16 07:48:17 +03:00
parent 8ba5ef7a4d
commit 189b58b6c6
2 changed files with 3 additions and 0 deletions

View File

@ -26,3 +26,4 @@
1 [[3,4,5],[4,5,6],[5,6,7],[7,8],[9]] [[4,5],[5,6],[6,7],[8,8],[9,9]]
2 [[6,7,8],[7,8,9],[8,9,10],[9,10,11],[10,11,12],[11,12,13],[13,14],[15]] [[7,8],[8,9],[9,10],[10,11],[11,12],[12,13],[14,14],[15,15]]
3 [[9],[10],[11],[12],[13],[14],[15],[16],[17]] [[9,9],[10,10],[11,11],[12,12],[13,13],[14,14],[15,15],[16,16],[17,17]]
[2,1,1]

View File

@ -21,3 +21,5 @@ SELECT k, groupArrayForEach(arr) FROM (SELECT number % 3 AS k, arrayMap(x -> toS
SELECT k, groupArrayForEach(arr) FROM (SELECT intDiv(number, 3) AS k, arrayMap(x -> toString(x), range(number)) AS arr FROM system.numbers LIMIT 10) GROUP BY k ORDER BY k;
SELECT k, groupArrayForEach(arr), quantilesExactForEach(0.5, 0.9)(arr) FROM (SELECT intDiv(number, 3) AS k, arrayMap(x -> number + x, range(number)) AS arr FROM system.numbers LIMIT 10) GROUP BY k ORDER BY k;
SELECT uniqForEach(x) FROM (SELECT emptyArrayUInt8() AS x UNION ALL SELECT [1, 2, 3] UNION ALL SELECT emptyArrayUInt8() UNION ALL SELECT [2, 2]);