Fixed code review issues

This commit is contained in:
Maksim Kita 2022-11-17 21:51:56 +01:00
parent cdc2fb0b59
commit 0fe17c2c7b
4 changed files with 9 additions and 12 deletions

View File

@ -34,17 +34,14 @@ inline bool operator!=(const QueryTreeNodeWithHash<T> & lhs, const QueryTreeNode
}
using QueryTreeNodePtrWithHash = QueryTreeNodeWithHash<QueryTreeNodePtr>;
using QueryTreeNodeConstPtrWithHash = QueryTreeNodeWithHash<const QueryTreeNodePtr>;
using QueryTreeNodeRawPtrWithHash = QueryTreeNodeWithHash<IQueryTreeNode *>;
using QueryTreeNodeConstRawPtrWithHash = QueryTreeNodeWithHash<const IQueryTreeNode *>;
using QueryTreeNodeConstPtrWithHashSet = std::unordered_set<QueryTreeNodeConstPtrWithHash>;
using QueryTreeNodePtrWithHashSet = std::unordered_set<QueryTreeNodePtrWithHash>;
using QueryTreeNodeConstRawPtrWithHashSet = std::unordered_set<QueryTreeNodeConstRawPtrWithHash>;
template <typename Value>
using QueryTreeNodeConstPtrWithHashMap = std::unordered_map<QueryTreeNodeConstPtrWithHash, Value>;
using QueryTreeNodePtrWithHashMap = std::unordered_map<QueryTreeNodePtrWithHash, Value>;
template <typename Value>
using QueryTreeNodeConstRawPtrWithHashMap = std::unordered_map<QueryTreeNodeConstRawPtrWithHash, Value>;

View File

@ -2171,7 +2171,7 @@ QueryTreeNodePtr QueryAnalyzer::tryResolveIdentifierFromAliases(const Identifier
auto & alias_identifier_node = it->second->as<IdentifierNode &>();
auto identifier = alias_identifier_node.getIdentifier();
auto lookup_result = tryResolveIdentifier(IdentifierLookup{identifier, identifier_lookup.lookup_context}, scope, identifier_resolve_settings);
if (!lookup_result.isResolved())
if (!lookup_result.resolved_identifier)
{
std::unordered_set<Identifier> valid_identifiers;
collectScopeWithParentScopesValidIdentifiersForTypoCorrection(identifier, scope, true, false, false, valid_identifiers);

View File

@ -183,19 +183,19 @@ public:
}
private:
/// Valid for table, table function, array join, query, union table expression nodes
/// Valid for table, table function, array join, query, union nodes
NamesAndTypesList columns;
/// Valid for table, table function, array join, query, union expression nodes
/// Valid for table, table function, array join, query, union nodes
NameSet columns_names;
/// Valid only for table table expression node
/// Valid only for table node
NameSet alias_columns_names;
/// Valid for table, table function, array join, query, union table expression nodes
/// Valid for table, table function, array join, query, union nodes
ColumnNameToColumnIdentifier column_name_to_column_identifier;
/// Valid for table, table function, array join, query, union table expression nodes
/// Valid for table, table function, array join, query, union nodes
ColumnIdentifierToColumnName column_identifier_to_column_name;
/// Is storage remote