Update src/Analyzer/Passes/QueryAnalysisPass.cpp

Co-authored-by: Dmitry Novik <n0vik@clickhouse.com>
This commit is contained in:
Nikolai Kochetov 2024-05-23 11:51:34 +02:00 committed by GitHub
parent 51afec4910
commit a21377cf51
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -638,7 +638,10 @@ struct ScopeAliases
auto it = alias_map.find(*key);
if (it == alias_map.end() && lookup.lookup_context == IdentifierLookupContext::TABLE_EXPRESSION)
if (it != alias_map.end())
return &it->second;
if (lookup.lookup_context == IdentifierLookupContext::TABLE_EXPRESSION)
return {};
while (it == alias_map.end())