2017-12-14 09:02:12 +00:00
|
|
|
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');
|
|
|
|
|
2017-12-21 02:18:21 +00:00
|
|
|
SELECT arraySort(groupUniqArray(description)) FROM test.agg_over_nullable;
|
|
|
|
SELECT arraySort(topK(3)(description)) FROM test.agg_over_nullable;
|
2017-12-14 09:02:12 +00:00
|
|
|
|
|
|
|
DROP TABLE test.agg_over_nullable;
|