mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Added test for LowCardinality with rollup and cube.
This commit is contained in:
parent
cf40a1538b
commit
8e2cc98416
@ -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
|
@ -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;
|
Loading…
Reference in New Issue
Block a user