mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
dbms: development [#CONV-2944].
This commit is contained in:
parent
26c9af828e
commit
5bc7288e0d
@ -87,7 +87,7 @@ StoragePtr InterpreterCreateQuery::execute()
|
|||||||
else if (!create.as_table.empty())
|
else if (!create.as_table.empty())
|
||||||
storage_name = (*context.databases)[as_database_name][as_table_name]->getName();
|
storage_name = (*context.databases)[as_database_name][as_table_name]->getName();
|
||||||
else
|
else
|
||||||
throw Exception("Incorrect CREATE query: required ENGINE or AS section.", ErrorCodes::INCORRECT_QUERY);
|
throw Exception("Incorrect CREATE query: required ENGINE.", ErrorCodes::INCORRECT_QUERY);
|
||||||
|
|
||||||
StoragePtr res = context.storage_factory->get(storage_name, data_path, table_name, columns);
|
StoragePtr res = context.storage_factory->get(storage_name, data_path, table_name, columns);
|
||||||
|
|
||||||
|
@ -76,7 +76,6 @@ bool ParserEngine::parseImpl(Pos & pos, Pos end, ASTPtr & storage, String & expe
|
|||||||
|
|
||||||
ws.ignore(pos, end);
|
ws.ignore(pos, end);
|
||||||
|
|
||||||
/// ENGINE
|
|
||||||
if (s_engine.ignore(pos, end, expected))
|
if (s_engine.ignore(pos, end, expected))
|
||||||
{
|
{
|
||||||
ws.ignore(pos, end);
|
ws.ignore(pos, end);
|
||||||
@ -179,9 +178,11 @@ bool ParserCreateQuery::parseImpl(Pos & pos, Pos end, ASTPtr & node, String & ex
|
|||||||
if (!engine_p.parse(pos, end, storage, expected))
|
if (!engine_p.parse(pos, end, storage, expected))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (s_as.ignore(pos, end, expected))
|
else
|
||||||
{
|
{
|
||||||
if (!engine_p.parse(pos, end, storage, expected))
|
engine_p.parse(pos, end, storage, expected);
|
||||||
|
|
||||||
|
if (!s_as.ignore(pos, end, expected))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
ws.ignore(pos, end);
|
ws.ignore(pos, end);
|
||||||
@ -212,8 +213,6 @@ bool ParserCreateQuery::parseImpl(Pos & pos, Pos end, ASTPtr & node, String & ex
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return false;
|
|
||||||
|
|
||||||
ASTCreateQuery * query = new ASTCreateQuery(StringRange(begin, pos));
|
ASTCreateQuery * query = new ASTCreateQuery(StringRange(begin, pos));
|
||||||
node = query;
|
node = query;
|
||||||
|
Loading…
Reference in New Issue
Block a user