From 417cc7f6e20ab6108b6390812e9c30c35af5b6ae Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Mon, 26 Feb 2018 13:19:47 +0300 Subject: [PATCH] Better UNION ALL: development #1947 --- dbms/src/Interpreters/InterpreterSelectQuery.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dbms/src/Interpreters/InterpreterSelectQuery.cpp b/dbms/src/Interpreters/InterpreterSelectQuery.cpp index 4361a17dedf..67e683ee028 100644 --- a/dbms/src/Interpreters/InterpreterSelectQuery.cpp +++ b/dbms/src/Interpreters/InterpreterSelectQuery.cpp @@ -1,5 +1,3 @@ -#include - #include #include #include @@ -516,7 +514,7 @@ static void getLimitLengthAndOffset(ASTSelectQuery & query, size_t & length, siz QueryProcessingStage::Enum InterpreterSelectQuery::executeFetchColumns(Pipeline & pipeline) { /// The subquery interpreter, if the subquery - std::optional interpreter_subquery; + std::unique_ptr interpreter_subquery; /// List of columns to read to execute the query. Names required_columns = query_analyzer->getRequiredSourceColumns(); @@ -573,7 +571,7 @@ QueryProcessingStage::Enum InterpreterSelectQuery::executeFetchColumns(Pipeline subquery_settings.extremes = 0; subquery_context.setSettings(subquery_settings); - interpreter_subquery.emplace( + interpreter_subquery = std::make_unique( query_table, subquery_context, required_columns, QueryProcessingStage::Complete, subquery_depth + 1); /// If there is an aggregation in the outer query, WITH TOTALS is ignored in the subquery.