mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
dbms: development [#CONV-2944].
This commit is contained in:
parent
8359bbbe6b
commit
ae75c86be3
@ -182,6 +182,7 @@ StoragePtr InterpreterCreateQuery::execute()
|
||||
ASTCreateQuery & attach = dynamic_cast<ASTCreateQuery &>(*attach_ptr);
|
||||
|
||||
attach.attach = true;
|
||||
attach.database.clear();
|
||||
attach.as_database.clear();
|
||||
attach.as_table.clear();
|
||||
attach.if_not_exists = false;
|
||||
|
@ -170,13 +170,9 @@ void formatAST(const ASTCreateQuery & ast, std::ostream & s, size_t indent, bo
|
||||
|
||||
if (ast.columns)
|
||||
{
|
||||
if (one_line)
|
||||
s << " (";
|
||||
else
|
||||
s << "\n(\n";
|
||||
|
||||
s << (one_line ? " (" : "\n(");
|
||||
formatAST(*ast.columns, s, indent + 1, hilite, one_line);
|
||||
s << ")";
|
||||
s << (one_line ? ")" : "\n)");
|
||||
}
|
||||
|
||||
if (ast.storage)
|
||||
@ -354,9 +350,8 @@ void formatAST(const ASTNameTypePair & ast, std::ostream & s, size_t indent, bo
|
||||
std::string indent_str = one_line ? "" : std::string(4 * indent, ' ');
|
||||
std::string nl_or_ws = one_line ? " " : "\n";
|
||||
|
||||
s << indent_str << backQuoteIfNeed(ast.name) << " ";
|
||||
s << nl_or_ws << indent_str << backQuoteIfNeed(ast.name) << " ";
|
||||
formatAST(*ast.type, s, indent, hilite, one_line);
|
||||
s << nl_or_ws;
|
||||
}
|
||||
|
||||
void formatAST(const ASTAsterisk & ast, std::ostream & s, size_t indent, bool hilite, bool one_line)
|
||||
|
Loading…
Reference in New Issue
Block a user