From abdda03dada0bc1f09b418d8404f862ee098e970 Mon Sep 17 00:00:00 2001 From: Yarik Briukhovetskyi <114298166+yariks5s@users.noreply.github.com> Date: Mon, 16 Dec 2024 17:19:00 +0100 Subject: [PATCH] Minor improvements --- src/Analyzer/QueryNode.h | 14 ++------------ src/Analyzer/QueryTreeBuilder.cpp | 2 +- 2 files changed, 3 insertions(+), 13 deletions(-) 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();