From 5e42441a722396ac630a1467d981abb53594c4f0 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Thu, 18 Jun 2020 17:19:14 +0300 Subject: [PATCH] add test --- .../01144_multiword_data_types.reference | 3 ++ .../01144_multiword_data_types.sql | 29 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 tests/queries/0_stateless/01144_multiword_data_types.reference create mode 100644 tests/queries/0_stateless/01144_multiword_data_types.sql diff --git a/tests/queries/0_stateless/01144_multiword_data_types.reference b/tests/queries/0_stateless/01144_multiword_data_types.reference new file mode 100644 index 00000000000..0f3b4691734 --- /dev/null +++ b/tests/queries/0_stateless/01144_multiword_data_types.reference @@ -0,0 +1,3 @@ +CREATE TABLE default.multiword_types\n(\n `a` Float64,\n `b` Float64,\n `c` String DEFAULT \'str\',\n `d` String,\n `e` String COMMENT \'comment\',\n `f` String,\n `g` String,\n `h` String DEFAULT toString(a) COMMENT \'comment\',\n `i` String,\n `j` String,\n `k` String,\n `l` String,\n `m` String,\n `n` String,\n `o` String,\n `p` String\n)\nENGINE = Memory +Tuple(Float64, Float64, String, String, String, String, String, String, String, String, String, String, String, String, String, String) +42 42 diff --git a/tests/queries/0_stateless/01144_multiword_data_types.sql b/tests/queries/0_stateless/01144_multiword_data_types.sql new file mode 100644 index 00000000000..7d96c5a1d74 --- /dev/null +++ b/tests/queries/0_stateless/01144_multiword_data_types.sql @@ -0,0 +1,29 @@ +DROP TABLE IF EXISTS multiword_types; + +CREATE TABLE multiword_types ( + a DOUBLE, + b DOUBLE PRECISION, + c CHAR DEFAULT 'str', + d CHAR VARYING, + e CHAR LARGE OBJECT COMMENT 'comment', + f CHARACTER VARYING(123), + g ChArAcTeR large OBJECT, + h nchar varying (456) default toString(a) comment 'comment', + i NCHAR LARGE OBJECT, + j BINARY LARGE OBJECT, + k BINARY VARYING, + l NATIONAL CHAR, + m NATIONAL CHARACTER, + n NATIONAL CHARACTER LARGE OBJECT, + o NATIONAL CHARACTER VARYING, + p NATIONAL CHAR VARYING +) ENGINE=Memory; + +SHOW CREATE TABLE multiword_types; + +INSERT INTO multiword_types(a) VALUES (1); +SELECT toTypeName((*,)) FROM multiword_types; + +SELECT CAST('42' AS DOUBLE PRECISION), CAST(42, 'NATIONAL CHARACTER VARYING'); + +DROP TABLE multiword_types;