Fix + SortMode::None as default value

This commit is contained in:
Igor Nikonov 2022-07-09 08:33:21 +00:00
parent 16d2319a8d
commit 2a7e3bd741
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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)
{