Update Internals.cpp

This commit is contained in:
Nikita Mikhaylov 2020-10-10 02:31:33 +03:00 committed by GitHub
parent b45a4a2cd1
commit dbb607573b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -171,10 +171,10 @@ ASTPtr extractOrderBy(const ASTPtr & storage_ast)
/// Wraps only identifiers with backticks. /// Wraps only identifiers with backticks.
std::string wrapIdentifiersWithBackticks(const ASTPtr & root) std::string wrapIdentifiersWithBackticks(const ASTPtr & root)
{ {
if (auto identifier = std::dynamic_pointer_cast<ASTIdentifier>(root)) if (auto identifier = std::dynamic_pointer_cast<ASTIdentifier>(root))
return backQuote(identifier->name); return backQuote(identifier->name);
if (auto function = std::dynamic_pointer_cast<ASTFunction>(root)) if (auto function = std::dynamic_pointer_cast<ASTFunction>(root))
return function->name + '(' + wrapIdentifiersWithBackticks(function->arguments) + ')'; return function->name + '(' + wrapIdentifiersWithBackticks(function->arguments) + ')';
if (auto expression_list = std::dynamic_pointer_cast<ASTExpressionList>(root)) if (auto expression_list = std::dynamic_pointer_cast<ASTExpressionList>(root))