This commit is contained in:
Alexander Tokmakov 2020-06-18 17:19:14 +03:00
parent 5a6b70f5c1
commit 5e42441a72
2 changed files with 32 additions and 0 deletions

View File

@ -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

View File

@ -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;