From c3a2e73f323a5cb9b77ad44d7f5d80374d650013 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Mon, 4 Mar 2019 18:53:51 +0300 Subject: [PATCH] Fixed build --- .../Interpreters/FindIdentifierBestTableVisitor.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dbms/src/Interpreters/FindIdentifierBestTableVisitor.cpp b/dbms/src/Interpreters/FindIdentifierBestTableVisitor.cpp index 8c9f7403898..8173ce3256a 100644 --- a/dbms/src/Interpreters/FindIdentifierBestTableVisitor.cpp +++ b/dbms/src/Interpreters/FindIdentifierBestTableVisitor.cpp @@ -16,13 +16,13 @@ void FindIdentifierBestTableData::visit(ASTIdentifier & identifier, ASTPtr &) if (!identifier.compound()) { - for (const auto & [table, names] : tables) + for (const auto & table_names : tables) { - if (std::find(names.begin(), names.end(), identifier.name) != names.end()) + if (std::find(table_names.second.begin(), table_names.second.end(), identifier.name) != table_names.second.end()) { // TODO: make sure no collision ever happens if (!best_table) - best_table = &table; + best_table = &table_names.first; } } } @@ -30,13 +30,13 @@ void FindIdentifierBestTableData::visit(ASTIdentifier & identifier, ASTPtr &) { // FIXME: make a better matcher using `names`? size_t best_match = 0; - for (const auto & [table, names] : tables) + for (const auto & table_names : tables) { - if (size_t match = IdentifierSemantic::canReferColumnToTable(identifier, table)) + if (size_t match = IdentifierSemantic::canReferColumnToTable(identifier, table_names.first)) if (match > best_match) { best_match = match; - best_table = &table; + best_table = &table_names.first; } } }