mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-20 14:42:02 +00:00
Fixed code review issues
This commit is contained in:
parent
cdc2fb0b59
commit
0fe17c2c7b
@ -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>;
|
||||
|
@ -77,7 +77,7 @@ FunctionNodePtr createResolvedAggregateFunction(const String & name, const Query
|
||||
AggregateFunctionProperties properties;
|
||||
auto aggregate_function = AggregateFunctionFactory::instance().get(name, {argument->getResultType()}, parameters, properties);
|
||||
function_node->resolveAsAggregateFunction(aggregate_function, aggregate_function->getReturnType());
|
||||
function_node->getArguments().getNodes() = {argument};
|
||||
function_node->getArguments().getNodes() = { argument };
|
||||
|
||||
return function_node;
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user