From 643c2b747a9512b43355c314185497fa3114e8c4 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Fri, 18 Nov 2016 11:31:46 +0300 Subject: [PATCH] Added test [#METR-23539]. --- .../queries/0_stateless/00388_enum_with_totals.reference | 4 ++++ dbms/tests/queries/0_stateless/00388_enum_with_totals.sql | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100644 dbms/tests/queries/0_stateless/00388_enum_with_totals.reference create mode 100644 dbms/tests/queries/0_stateless/00388_enum_with_totals.sql diff --git a/dbms/tests/queries/0_stateless/00388_enum_with_totals.reference b/dbms/tests/queries/0_stateless/00388_enum_with_totals.reference new file mode 100644 index 00000000000..8cc221387c4 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00388_enum_with_totals.reference @@ -0,0 +1,4 @@ +hello 1 +world 2 + +hello 3 diff --git a/dbms/tests/queries/0_stateless/00388_enum_with_totals.sql b/dbms/tests/queries/0_stateless/00388_enum_with_totals.sql new file mode 100644 index 00000000000..3afa5deb092 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00388_enum_with_totals.sql @@ -0,0 +1,6 @@ +DROP TABLE IF EXISTS test.enum_totals; +CREATE TABLE test.enum_totals (e Enum8('hello' = 1, 'world' = 2)) ENGINE = Memory; +INSERT INTO test.enum_totals VALUES ('hello'), ('world'), ('world'); + +SELECT e, count() FROM test.enum_totals GROUP BY e WITH TOTALS ORDER BY e; +DROP TABLE test.enum_totals;