Merge pull request #9999 from vitlibar/fix-parallel-distributed-insert-select

Fix parallel distributed insert select
This commit is contained in:
alesapin 2020-04-03 11:46:32 +03:00 committed by GitHub
commit eea9845fc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -176,7 +176,7 @@ BlockIO InterpreterInsertQuery::execute()
"Expected exactly one connection for shard " + toString(shard_info.shard_num), ErrorCodes::LOGICAL_ERROR);
/// INSERT SELECT query returns empty block
auto in_stream = std::make_shared<RemoteBlockInputStream>(*connections.front(), new_query_str, Block{}, context);
auto in_stream = std::make_shared<RemoteBlockInputStream>(std::move(connections), new_query_str, Block{}, context);
in_streams.push_back(in_stream);
}
out_streams.push_back(std::make_shared<NullBlockOutputStream>(Block()));