From 7bfb5c9a47a5058bcda068c825ec75c0aae25c16 Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Thu, 18 Jun 2020 21:40:02 +0300 Subject: [PATCH] Fix build. --- src/Interpreters/InterpreterInsertQuery.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/Interpreters/InterpreterInsertQuery.cpp b/src/Interpreters/InterpreterInsertQuery.cpp index 7deed262eda..e84186e91f7 100644 --- a/src/Interpreters/InterpreterInsertQuery.cpp +++ b/src/Interpreters/InterpreterInsertQuery.cpp @@ -3,18 +3,15 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -24,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -32,7 +28,6 @@ #include #include #include -#include namespace DB @@ -162,7 +157,7 @@ BlockIO InterpreterInsertQuery::execute() const auto & cluster = storage_src->getCluster(); const auto & shards_info = cluster->getShardsInfo(); - std::vector pipelines; + std::vector> pipelines; String new_query_str = queryToString(new_query); for (size_t shard_index : ext::range(0, shards_info.size())) @@ -171,7 +166,7 @@ BlockIO InterpreterInsertQuery::execute() if (shard_info.isLocal()) { InterpreterInsertQuery interpreter(new_query, context); - pipelines.emplace_back(interpreter.execute().pipeline); + pipelines.emplace_back(std::make_unique(interpreter.execute().pipeline)); } else { @@ -184,8 +179,8 @@ BlockIO InterpreterInsertQuery::execute() /// INSERT SELECT query returns empty block auto in_stream = std::make_shared(std::move(connections), new_query_str, Block{}, context); pipelines.emplace_back(); - pipelines.back().init(Pipe(std::make_shared(std::move(in_stream)))); - pipelines.back().setSinks([](const Block & header, QueryPipeline::StreamType) -> ProcessorPtr + pipelines.back()->init(Pipe(std::make_shared(std::move(in_stream)))); + pipelines.back()->setSinks([](const Block & header, QueryPipeline::StreamType) -> ProcessorPtr { return std::make_shared(header); });