mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Force read in order of parts using single thread.
This commit is contained in:
parent
93daa16271
commit
4837257bca
@ -61,6 +61,7 @@ namespace std
|
|||||||
#include <Processors/Transforms/MergingSortedTransform.h>
|
#include <Processors/Transforms/MergingSortedTransform.h>
|
||||||
#include <Processors/Executors/TreeExecutorBlockInputStream.h>
|
#include <Processors/Executors/TreeExecutorBlockInputStream.h>
|
||||||
#include <Processors/Sources/SourceFromInputStream.h>
|
#include <Processors/Sources/SourceFromInputStream.h>
|
||||||
|
#include <Processors/ConcatProcessor.h>
|
||||||
|
|
||||||
namespace ProfileEvents
|
namespace ProfileEvents
|
||||||
{
|
{
|
||||||
@ -802,6 +803,15 @@ Pipes MergeTreeDataSelectExecutor::spreadMarkRangesAmongStreams(
|
|||||||
|
|
||||||
res.emplace_back(std::move(source));
|
res.emplace_back(std::move(source));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Use ConcatProcessor to concat sources together.
|
||||||
|
/// It is needed to read in parts order (and so in PK order) if single thread is used.
|
||||||
|
if (res.size() > 1)
|
||||||
|
{
|
||||||
|
auto concat = std::make_shared<ConcatProcessor>(res.front().getHeader(), res.size());
|
||||||
|
Pipe pipe(std::move(res), std::move(concat));
|
||||||
|
res = { std::move(pipe) };
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
Loading…
Reference in New Issue
Block a user