diff --git a/src/Planner/Utils.cpp b/src/Planner/Utils.cpp index 9c46622f578..9a6ef6f5d83 100644 --- a/src/Planner/Utils.cpp +++ b/src/Planner/Utils.cpp @@ -436,8 +436,8 @@ QueryTreeNodePtr buildSubqueryToReadColumnsFromTableExpression(const NamesAndTyp auto query_node = std::make_shared(std::move(context_copy)); - query_node->resolveProjectionColumns(projection_columns); query_node->getProjection().getNodes() = std::move(subquery_projection_nodes); + query_node->resolveProjectionColumns(projection_columns); query_node->getJoinTree() = table_expression; query_node->setIsSubquery(true);