mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
Return single row for aggregation without keys on empty set: development [#CLICKHOUSE-1920] #51
This commit is contained in:
parent
7415513151
commit
47ff837c9f
@ -2,4 +2,6 @@
|
||||
0
|
||||
1
|
||||
0 0 nan \N [] []
|
||||
0 0 nan \N [] []
|
||||
0 0 nan \N [] []
|
||||
1
|
||||
|
@ -7,6 +7,8 @@ SELECT count() FROM system.one WHERE rand() < 0;
|
||||
SELECT count() FROM system.one WHERE 1;
|
||||
|
||||
SELECT count(), uniq(x), avg(x), avg(toNullable(x)), groupArray(x), groupUniqArray(x) FROM t;
|
||||
SELECT count(), uniq(x), avg(x), avg(toNullable(x)), groupArray(x), groupUniqArray(x) FROM (SELECT * FROM t UNION ALL SELECT * FROM t);
|
||||
SELECT count(), uniq(x), avg(x), avg(toNullable(x)), groupArray(x), groupUniqArray(x) FROM remote('127.0.0.{1..10}', system.one) WHERE (rand() AS x) < 0;
|
||||
SELECT x, count(), uniq(x), avg(x), avg(toNullable(x)), groupArray(x), groupUniqArray(x) FROM t GROUP BY x;
|
||||
|
||||
SET empty_result_for_aggregation_by_empty_set = 1;
|
||||
@ -16,4 +18,6 @@ SELECT count() FROM system.one WHERE rand() < 0;
|
||||
SELECT count() FROM system.one WHERE 1;
|
||||
|
||||
SELECT count(), uniq(x), avg(x), avg(toNullable(x)), groupArray(x), groupUniqArray(x) FROM t;
|
||||
SELECT count(), uniq(x), avg(x), avg(toNullable(x)), groupArray(x), groupUniqArray(x) FROM (SELECT * FROM t UNION ALL SELECT * FROM t);
|
||||
SELECT count(), uniq(x), avg(x), avg(toNullable(x)), groupArray(x), groupUniqArray(x) FROM remote('127.0.0.{1..10}', system.one) WHERE (rand() AS x) < 0;
|
||||
SELECT x, count(), uniq(x), avg(x), avg(toNullable(x)), groupArray(x), groupUniqArray(x) FROM t GROUP BY x;
|
||||
|
Loading…
Reference in New Issue
Block a user