From 38e55c7883fd3519b9f6d7e4ff7c4d2939df219d Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sun, 26 Apr 2020 19:39:48 +0300 Subject: [PATCH] Move old bug to test --- .../01262_low_cardinality_remove.reference | 6 ++++++ .../01262_low_cardinality_remove.sql} | 16 +++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 tests/queries/0_stateless/01262_low_cardinality_remove.reference rename tests/queries/{bugs/low_cardinality_remove.sql => 0_stateless/01262_low_cardinality_remove.sql} (68%) diff --git a/tests/queries/0_stateless/01262_low_cardinality_remove.reference b/tests/queries/0_stateless/01262_low_cardinality_remove.reference new file mode 100644 index 00000000000..ba8beadd752 --- /dev/null +++ b/tests/queries/0_stateless/01262_low_cardinality_remove.reference @@ -0,0 +1,6 @@ +A +B +C +A +B +C diff --git a/tests/queries/bugs/low_cardinality_remove.sql b/tests/queries/0_stateless/01262_low_cardinality_remove.sql similarity index 68% rename from tests/queries/bugs/low_cardinality_remove.sql rename to tests/queries/0_stateless/01262_low_cardinality_remove.sql index 96192237ee8..e03b895ffee 100644 --- a/tests/queries/bugs/low_cardinality_remove.sql +++ b/tests/queries/0_stateless/01262_low_cardinality_remove.sql @@ -7,18 +7,18 @@ CREATE TABLE IF NOT EXISTS testTable ( ) ENGINE MergeTree() ORDER BY (A); -INSERT INTO testTable VALUES ('A', 1),('B',2),('C',3) +INSERT INTO testTable VALUES ('A', 1),('B',2),('C',3); CREATE VIEW testView AS -SELECT +SELECT A as ALow, -- like account B -FROM +FROM testTable; SELECT CAST(ALow, 'String') AS AStr FROM testView -GROUP BY AStr; +GROUP BY AStr ORDER BY AStr; DROP TABLE testTable; @@ -30,7 +30,13 @@ ORDER BY (A); SELECT CAST(ALow, 'String') AS AStr FROM testView -GROUP BY AStr; +GROUP BY AStr ORDER BY AStr; + +INSERT INTO testTable VALUES ('A', 1),('B',2),('C',3); + +SELECT CAST(ALow, 'String') AS AStr +FROM testView +GROUP BY AStr ORDER BY AStr; DROP TABLE IF EXISTS testView; DROP TABLE IF EXISTS testTable;