mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Merge pull request #16586 from kitaisreal/create-query-nested-type-column-formatting-intendation-fix
CreateQuery nested type column formatting fix
This commit is contained in:
commit
59ea3e7db0
@ -55,7 +55,11 @@ void ASTColumnDeclaration::formatImpl(const FormatSettings & settings, FormatSta
|
||||
if (type)
|
||||
{
|
||||
settings.ostr << ' ';
|
||||
type->formatImpl(settings, state, frame);
|
||||
|
||||
FormatStateStacked type_frame = frame;
|
||||
type_frame.indent = 0;
|
||||
|
||||
type->formatImpl(settings, state, type_frame);
|
||||
}
|
||||
|
||||
if (null_modifier)
|
||||
|
@ -1,12 +1,12 @@
|
||||
CREATE TABLE default.tuple
|
||||
(
|
||||
`j` Tuple( a Int8, b String)
|
||||
`j` Tuple(a Int8, b String)
|
||||
)
|
||||
ENGINE = Memory
|
||||
j Tuple(a Int8, b String)
|
||||
CREATE TABLE default.tuple
|
||||
(
|
||||
`j` Tuple( a Int8, b String)
|
||||
`j` Tuple(a Int8, b String)
|
||||
)
|
||||
ENGINE = Memory
|
||||
j Tuple(a Int8, b String)
|
||||
|
@ -10,9 +10,7 @@ SHOW CREATE TABLE tuple FORMAT TSVRaw;
|
||||
DESC tuple;
|
||||
DROP TABLE tuple;
|
||||
|
||||
CREATE TABLE tuple
|
||||
ENGINE = Memory AS
|
||||
SELECT CAST((1, 'Test'), 'Tuple(a Int8, b String)') AS j;
|
||||
CREATE TABLE tuple ENGINE = Memory AS SELECT CAST((1, 'Test'), 'Tuple(a Int8, b String)') AS j;
|
||||
|
||||
SHOW CREATE TABLE tuple FORMAT TSVRaw;
|
||||
DESC tuple;
|
||||
|
@ -0,0 +1,12 @@
|
||||
CREATE TABLE test
|
||||
(
|
||||
`a` Int64,
|
||||
`b` NESTED(a Int64)
|
||||
)
|
||||
ENGINE = TinyLog
|
||||
CREATE TABLE test
|
||||
(
|
||||
`a` Int64,
|
||||
`b` TUPLE(a Int64)
|
||||
)
|
||||
ENGINE = TinyLog
|
8
tests/queries/0_stateless/01548_create_table_compound_column_format.sh
Executable file
8
tests/queries/0_stateless/01548_create_table_compound_column_format.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
. "$CURDIR"/../shell_config.sh
|
||||
|
||||
echo "CREATE TABLE test(a Int64, b NESTED(a Int64)) ENGINE=TinyLog" | $CLICKHOUSE_FORMAT
|
||||
|
||||
echo "CREATE TABLE test(a Int64, b TUPLE(a Int64)) ENGINE=TinyLog" | $CLICKHOUSE_FORMAT
|
Loading…
Reference in New Issue
Block a user