update code style

This commit is contained in:
zzsmdfj 2022-11-04 10:04:01 +08:00
parent 61123b7f54
commit 1a8568473c

View File

@ -546,9 +546,9 @@ std::vector<TableNeededColumns> normalizeColumnNamesExtractNeeded(
{
auto alias = aliases.find(ident->name())->second;
auto alias_ident = alias->clone();
if ( alias_ident->as<ASTIdentifier>())
if (auto * alias_ident_typed = alias_ident->as<ASTIdentifier>())
{
alias_ident->as<ASTIdentifier>()->restoreTable();
alias_ident_typed->restoreTable();
bool alias_equals_column_name = alias_ident->getColumnNameWithoutAlias() == ident->getColumnNameWithoutAlias();
if (!alias_equals_column_name)
throw Exception("Alias clashes with qualified column '" + ident->name() + "'", ErrorCodes::AMBIGUOUS_COLUMN_NAME);