mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
CreateQuery create as select with columns specification
This commit is contained in:
parent
e7ffae89e9
commit
d8534ae1af
@ -449,12 +449,21 @@ bool ParserCreateTableQuery::parseImpl(Pos & pos, ASTPtr & node, Expected & expe
|
||||
if (!s_rparen.ignore(pos, expected))
|
||||
return false;
|
||||
|
||||
if (!storage_p.parse(pos, storage, expected) && !is_temporary)
|
||||
auto storage_parse_result = storage_p.parse(pos, storage, expected);
|
||||
|
||||
if (storage_parse_result && s_as.ignore(pos, expected))
|
||||
{
|
||||
select_p.parse(pos, select, expected);
|
||||
}
|
||||
|
||||
if (!storage_parse_result && !is_temporary)
|
||||
{
|
||||
if (!s_as.ignore(pos, expected))
|
||||
return false;
|
||||
if (!table_function_p.parse(pos, as_table_function, expected))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -0,0 +1 @@
|
||||
1
|
@ -49,3 +49,7 @@ DROP DICTIONARY dict;
|
||||
DROP TABLE test_01056_dict_data.dict_data;
|
||||
|
||||
DROP DATABASE test_01056_dict_data;
|
||||
|
||||
CREATE TABLE t1 (x String) ENGINE = Memory AS SELECT 1;
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
Loading…
Reference in New Issue
Block a user