Added test for LowCardinality with rollup and cube.

This commit is contained in:
Nikolai Kochetov 2019-02-13 19:56:06 +03:00
parent cf40a1538b
commit 8e2cc98416
2 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,18 @@
c d 1
a b 1
c \N 1
a \N 1
\N \N 2
c 1
a 1
\N 2
c d 1
a b 1
c \N 1
a \N 1
\N b 1
\N d 1
\N \N 2
c 1
a 1
\N 2

View File

@ -0,0 +1,14 @@
SET allow_experimental_low_cardinality_type = 1;
DROP TABLE if exists test.lc;
CREATE TABLE test.lc (a LowCardinality(Nullable(String)), b LowCardinality(Nullable(String))) ENGINE = MergeTree order by tuple();
INSERT INTO test.lc VALUES ('a', 'b');
INSERT INTO test.lc VALUES ('c', 'd');
SELECT a, b, count(a) FROM test.lc GROUP BY a, b WITH ROLLUP;
SELECT a, count(a) FROM test.lc GROUP BY a WITH ROLLUP;
SELECT a, b, count(a) FROM test.lc GROUP BY a, b WITH CUBE;
SELECT a, count(a) FROM test.lc GROUP BY a WITH CUBE;
DROP TABLE if exists test.lc;