mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-13 09:52:38 +00:00
Fix + SortMode::None as default value
This commit is contained in:
parent
16d2319a8d
commit
2a7e3bd741
@ -34,6 +34,7 @@ public:
|
||||
/// How data is sorted.
|
||||
enum class SortMode
|
||||
{
|
||||
None,
|
||||
Chunk, /// Separate chunks are sorted
|
||||
Port, /// Data from each port is sorted
|
||||
Stream, /// Data is globally sorted
|
||||
@ -41,7 +42,7 @@ public:
|
||||
|
||||
/// It is not guaranteed that header has columns from sort_description.
|
||||
SortDescription sort_description = {};
|
||||
SortMode sort_mode = SortMode::Chunk;
|
||||
SortMode sort_mode = SortMode::None;
|
||||
|
||||
/// Things which may be added:
|
||||
/// * limit
|
||||
|
@ -111,7 +111,7 @@ void SortingStep::transformPipeline(QueryPipelineBuilder & pipeline, const Build
|
||||
return;
|
||||
|
||||
/// merge sorted
|
||||
if (input_sort_mode == DataStream::SortMode::Chunk || input_sort_desc.hasPrefix(result_description))
|
||||
if (input_sort_mode == DataStream::SortMode::Chunk && input_sort_desc.hasPrefix(result_description))
|
||||
{
|
||||
if (pipeline.getNumStreams() > 1)
|
||||
{
|
||||
@ -124,7 +124,7 @@ void SortingStep::transformPipeline(QueryPipelineBuilder & pipeline, const Build
|
||||
}
|
||||
|
||||
/// finish shorting
|
||||
if (input_sort_mode == DataStream::SortMode::Chunk || result_description.hasPrefix(input_sort_desc))
|
||||
if (input_sort_mode == DataStream::SortMode::Chunk && result_description.hasPrefix(input_sort_desc))
|
||||
{
|
||||
if (pipeline.getNumStreams() > 1)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user