diff --git a/src/Analyzer/QueryNode.h b/src/Analyzer/QueryNode.h index 4e107e23d38..f4b5754be49 100644 --- a/src/Analyzer/QueryNode.h +++ b/src/Analyzer/QueryNode.h @@ -630,19 +630,9 @@ class QueryNode final : public IQueryTreeNode void dumpTreeImpl(WriteBuffer & buffer, FormatState & format_state, size_t indent) const override; - bool hasProjectionAliasesToOverride() + void setProjectionAliasesToOverride(Names pr_aliases) { - return !projection_aliases_to_override.empty(); - } - - Names getProjectionAliasesToOverride() - { - return projection_aliases_to_override; - } - - void setProjectionAliasesToOverride(Names && pr_aliases) - { - projection_aliases_to_override = pr_aliases; + projection_aliases_to_override = std::move(pr_aliases); } protected: diff --git a/src/Analyzer/QueryTreeBuilder.cpp b/src/Analyzer/QueryTreeBuilder.cpp index 52a52ac4460..c091399a4be 100644 --- a/src/Analyzer/QueryTreeBuilder.cpp +++ b/src/Analyzer/QueryTreeBuilder.cpp @@ -352,7 +352,7 @@ QueryTreeNodePtr QueryTreeBuilder::buildSelectExpression(const ASTPtr & select_q collected_aliases.push_back(alias_ast.name()); } - current_query_tree->setProjectionAliasesToOverride(std::move(collected_aliases)); + current_query_tree->setProjectionAliasesToOverride(collected_aliases); } auto prewhere_expression = select_query_typed.prewhere();