mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-12 17:32:32 +00:00
fix due to review
This commit is contained in:
parent
e7b96d9ec0
commit
637eb754a9
@ -50,10 +50,7 @@ void ASTDropQuery::formatQueryImpl(const FormatSettings & settings, FormatState
|
||||
settings.ostr << "TEMPORARY ";
|
||||
|
||||
if (has_all_tables)
|
||||
{
|
||||
settings.ostr << "ALL TABLES ";
|
||||
settings.ostr << "FROM "; /// When using `TRUNCATE ALL TABLES` we need to use the `FROM` keyword along with database name
|
||||
}
|
||||
settings.ostr << "ALL TABLES FROM ";
|
||||
else if (!table && !database_and_tables && database)
|
||||
settings.ostr << "DATABASE ";
|
||||
else if (is_dictionary)
|
||||
|
@ -56,14 +56,12 @@ bool parseDropQuery(IParser::Pos & pos, ASTPtr & node, Expected & expected, cons
|
||||
{
|
||||
has_all_tables = true;
|
||||
if (s_from.ignore(pos, expected))
|
||||
{
|
||||
if (s_if_exists.ignore(pos, expected))
|
||||
if_exists = true;
|
||||
return false;
|
||||
|
||||
if (!name_p.parse(pos, database, expected))
|
||||
return false;
|
||||
}
|
||||
else
|
||||
if (s_if_exists.ignore(pos, expected))
|
||||
if_exists = true;
|
||||
|
||||
if (!name_p.parse(pos, database, expected))
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
@ -40,7 +40,6 @@ bool ParserQuery::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
|
||||
ParserInsertQuery insert_p(end, allow_settings_after_format_in_insert);
|
||||
ParserUseQuery use_p;
|
||||
ParserSetQuery set_p;
|
||||
ParserDropQuery drop_p;
|
||||
ParserSystemQuery system_p;
|
||||
ParserCreateUserQuery create_user_p;
|
||||
ParserCreateRoleQuery create_role_p;
|
||||
|
Loading…
Reference in New Issue
Block a user