mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-13 09:52:38 +00:00
Disable finish sort with sorted chunks
This commit is contained in:
parent
7cd12393c2
commit
1efdb4e3e5
@ -3,6 +3,7 @@
|
||||
#include <IO/Operators.h>
|
||||
#include <Common/JSONBuilder.h>
|
||||
#include <Common/SipHash.h>
|
||||
|
||||
#if USE_EMBEDDED_COMPILER
|
||||
#include <DataTypes/Native.h>
|
||||
#include <Interpreters/JIT/compileFunction.h>
|
||||
|
@ -274,17 +274,17 @@ void SortingStep::transformPipeline(QueryPipelineBuilder & pipeline, const Build
|
||||
|
||||
if (input_sort_mode == DataStream::SortMode::Chunk)
|
||||
{
|
||||
if (result_description.hasPrefix(input_sort_desc))
|
||||
{
|
||||
LOG_DEBUG(getLogger(), "FinishSorting, SortMode::Chunk");
|
||||
bool need_finish_sorting = (input_sort_desc.size() < result_description.size());
|
||||
mergingSorted(pipeline, input_sort_desc, (need_finish_sorting ? 0 : limit));
|
||||
if (need_finish_sorting)
|
||||
{
|
||||
finishSorting(pipeline, input_sort_desc);
|
||||
}
|
||||
return;
|
||||
}
|
||||
// if (result_description.hasPrefix(input_sort_desc))
|
||||
// {
|
||||
// LOG_DEBUG(getLogger(), "FinishSorting, SortMode::Chunk");
|
||||
// bool need_finish_sorting = (input_sort_desc.size() < result_description.size());
|
||||
// mergingSorted(pipeline, input_sort_desc, (need_finish_sorting ? 0 : limit));
|
||||
// if (need_finish_sorting)
|
||||
// {
|
||||
// finishSorting(pipeline, input_sort_desc);
|
||||
// }
|
||||
// return;
|
||||
// }
|
||||
|
||||
/// almost full sort but chunks are already sorted, so skipping partial sort
|
||||
if (input_sort_desc.hasPrefix(result_description))
|
||||
|
Loading…
Reference in New Issue
Block a user