From 8085ce442c5412e1e712e47a163b1ab9a381607a Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Tue, 27 Nov 2018 21:09:37 +0300 Subject: [PATCH] Added test for LowCardinality order by. --- .../00752_low_cardinality_permute.reference | 24 +++++++++++++++++++ .../00752_low_cardinality_permute.sql | 8 +++++++ 2 files changed, 32 insertions(+) create mode 100644 dbms/tests/queries/0_stateless/00752_low_cardinality_permute.reference create mode 100644 dbms/tests/queries/0_stateless/00752_low_cardinality_permute.sql diff --git a/dbms/tests/queries/0_stateless/00752_low_cardinality_permute.reference b/dbms/tests/queries/0_stateless/00752_low_cardinality_permute.reference new file mode 100644 index 00000000000..cd274f6acb0 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00752_low_cardinality_permute.reference @@ -0,0 +1,24 @@ +0 z +1 w +3 y +4 w +6 y +8 z +10 x +11 x +12 a +13 b +14 c +15 d +16 e +17 f +18 g +19 h +w +w +x +x +y +y +z +z diff --git a/dbms/tests/queries/0_stateless/00752_low_cardinality_permute.sql b/dbms/tests/queries/0_stateless/00752_low_cardinality_permute.sql new file mode 100644 index 00000000000..56616e5bdc9 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00752_low_cardinality_permute.sql @@ -0,0 +1,8 @@ +set allow_experimental_low_cardinality_type = 1; +drop table if exists test.lc_perm; +create table test.lc_perm (val UInt32, str LowCardinality(String)) engine = MergeTree order by val; +insert into test.lc_perm values (1, 'w'), (10, 'x'), (3, 'y'), (8, 'z'), (4, 'w'), (6, 'y'), (11, 'x'), (0, 'z'), (12, 'a'), (13, 'b'), (14, 'c'), (15, 'd'), (16, 'e'), (17, 'f'), (18, 'g'), (19, 'h'); +select * from test.lc_perm; +select str from test.lc_perm where val < 12 order by str; +drop table if exists test.lc_perm; +