-
Notifications
You must be signed in to change notification settings - Fork 8.3k
20.5 Table creation with named tuples is broken #13027
Copy link
Copy link
Closed
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasest-acceptedThe issue is in our backlog, ready to takeThe issue is in our backlog, ready to take
Description
Describe the bug
Table creation with named tuples is broken
How to reproduce
ClickHouse server version 20.5.3.27
:) SELECT version();
┌─version()─┐
│ 20.5.3.27 │
└───────────┘
:) CREATE TABLE test.tuple
(
`j` Tuple( a Int8, b String)
)
ENGINE = Memory;
Received exception from server (version 20.5.3):
Code: 62. DB::Exception: Received from localhost:9000. DB::Exception: Syntax error (data type): failed at position 9: Int8, b String). Expected one of: LIKE, GLOBAL NOT IN, AS, IS, OR, QuestionMark, BETWEEN, NOT LIKE, AND, Comma, alias, IN, Dot, NOT, Arrow, token, NOT IN, GLOBAL IN.
:) CREATE TABLE test.tuple_from_select
ENGINE = Memory AS
SELECT CAST((1, 'Test'), 'Tuple( a Int8, b String)') AS j;
Received exception from server (version 20.5.3):
Code: 62. DB::Exception: Received from localhost:9000. DB::Exception: Syntax error (data type): failed at position 9: Int8, b String). Expected one of: LIKE, GLOBAL NOT IN, AS, IS, OR, QuestionMark, BETWEEN, NOT LIKE, AND, Comma, alias, IN, Dot, NOT, Arrow, token, NOT IN, GLOBAL IN.
This works fine on 20.4.6.53:
:) SELECT version();
┌─version()─┐
│ 20.4.6.53 │
└───────────┘
:) CREATE TABLE test.tuple
(
`j` Tuple( a Int8, b String)
)
ENGINE = Memory;
Ok.
:) SHOW CREATE TABLE test.tuple
┌─statement───────────────────────────────────────────────────────────────────────┐
│ CREATE TABLE test.tuple
(
`j` Tuple(
a Int8,
b String)
)
ENGINE = Memory │
└─────────────────────────────────────────────────────────────────────────────────┘
:) CREATE TABLE test.tuple_from_select
ENGINE = Memory AS
SELECT CAST((1, 'Test'), 'Tuple( a Int8, b String)') AS j;
Ok.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasest-acceptedThe issue is in our backlog, ready to takeThe issue is in our backlog, ready to take