This commit is contained in:
Dmitry Novik 2023-11-15 20:26:07 +00:00
parent 83acec9511
commit 592c653cac

View File

@ -336,7 +336,7 @@ void SortingStep::fullSort(
fullSortStreams(pipeline, sort_settings, result_sort_desc, limit_, skip_partial_sort);
/// If there are several streams, then we merge them into one
if ((pipeline.getNumStreams() > 1 && partition_by_description.empty()) || pipeline.getNumThreads() == 1)
if (pipeline.getNumStreams() > 1 && (partition_by_description.empty() || pipeline.getNumThreads() == 1))
{
auto transform = std::make_shared<MergingSortedTransform>(
pipeline.getHeader(),