Merge branch 'fix_aggregate_functions' of https://github.com/silviucpp/ClickHouse into silviucpp-fix_aggregate_functions

This commit is contained in:
Alexey Milovidov 2017-12-21 05:14:21 +03:00
commit 128c4a38d6
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,2 @@
['aa','ss']
['aa','ss']

View File

@ -0,0 +1,16 @@
DROP TABLE IF EXISTS test.agg_over_nullable;
CREATE TABLE test.agg_over_nullable (
partition Date,
timestamp DateTime,
user_id Nullable(UInt32),
description Nullable(String)
) ENGINE = MergeTree(partition, timestamp, 8192);
INSERT INTO test.agg_over_nullable(partition, timestamp, user_id, description) VALUES(now(), now(), 1, 'ss');
INSERT INTO test.agg_over_nullable(partition, timestamp, user_id, description) VALUES(now(), now(), 1, NULL);
INSERT INTO test.agg_over_nullable(partition, timestamp, user_id, description) VALUES(now(), now(), 1, 'aa');
SELECT groupUniqArray(description) FROM test.agg_over_nullable;
SELECT topK(3)(description) FROM test.agg_over_nullable;
DROP TABLE test.agg_over_nullable;