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;