未验证 提交 c4381e8a 编写于 作者: N Nikolai Kochetov 提交者: GitHub

Merge pull request #12618 from ClickHouse/fix-external-sort-pipeline-stuck

Fix external sort pipeline stuck
......@@ -231,9 +231,8 @@ void MergeSortingTransform::generate()
ProfileEvents::increment(ProfileEvents::ExternalSortMerge);
LOG_INFO(log, "There are {} temporary sorted parts to merge.", temporary_files.size());
if (!chunks.empty())
processors.emplace_back(std::make_shared<MergeSorterSource>(
header_without_constants, std::move(chunks), description, max_merged_block_size, limit));
processors.emplace_back(std::make_shared<MergeSorterSource>(
header_without_constants, std::move(chunks), description, max_merged_block_size, limit));
}
generated_prefix = true;
......
......@@ -8,3 +8,14 @@
8140551
5427034
2713517
-
440516
1540521
733765
1833770
1027014
220258
1320263
513507
1613512
806756
SET max_memory_usage = 300000000;
SET max_bytes_before_external_sort = 20000000;
SELECT number FROM (SELECT number FROM system.numbers LIMIT 10000000) ORDER BY number * 1234567890123456789 LIMIT 9999990, 10;
SELECT '-';
SET max_bytes_before_external_sort = 33554432;
set max_block_size = 1048576;
SELECT number FROM (SELECT number FROM numbers(2097152)) ORDER BY number * 1234567890123456789 LIMIT 2097142, 10;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册