Skip to content

20.5 Table creation with named tuples is broken #13027

@millin

Description

@millin

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.

Metadata

Metadata

Labels

bugConfirmed user-visible misbehaviour in official releasest-acceptedThe issue is in our backlog, ready to take

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions