Fixed strange code #3145

This commit is contained in:
Alexey Milovidov 2018-10-10 23:26:04 +03:00
parent b9ecc4b819
commit 5e50e6bfef

View File

@ -164,10 +164,10 @@ void QueryNormalizer::performImpl(ASTPtr & ast, MapOfASTs & finished_asts, SetOf
ASTIdentifier * identifier = typeid_cast<ASTIdentifier *>(qualified_asterisk->children[0].get()); ASTIdentifier * identifier = typeid_cast<ASTIdentifier *>(qualified_asterisk->children[0].get());
size_t num_components = identifier->children.size(); size_t num_components = identifier->children.size();
for (const auto table_name_and_columns_name : table_names_and_columns_name) for (const auto & table_name_and_columns_name : table_names_and_columns_name)
{ {
const auto table_name = table_name_and_columns_name.first; const auto & table_name = table_name_and_columns_name.first;
const auto table_all_columns_name = table_name_and_columns_name.second; const auto & table_all_columns_name = table_name_and_columns_name.second;
if ((num_components == 2 if ((num_components == 2
&& !table_name.database.empty() && !table_name.database.empty()