https://clickhouse-test-reports.s3.yandex.net/19475/02d28c1f9b9558ca5af267167a542819b9e1d061/fuzzer_debug/report.html#fail1
if (inputs.size() == num_files_for_merge || &file == &files.back())
                {
                    MergingSortedBlockInputStream sorted_input(inputs, sort_description, rows_in_block);
                    new_files.emplace_back(flushToFile(getPath(), sample_block, sorted_input, codec));
                    inputs.clear();
                }
            }
            files.clear();
            files.swap(new_files);
        }
        for (const auto & file : files)
            inputs.emplace_back(streamFromFile(file));
    }
    return PremergedFiles{std::move(files), std::move(inputs)};
}
SortedBlocksWriter::SortedFiles SortedBlocksWriter::finishMerge(std::function<void(const Block &)> callback)
{
    PremergedFiles files = premerge();
    MergingSortedBlockInputStream sorted_input(files.streams, sort_description, rows_in_block);
    return flushToManyFiles(getPath(), sample_block, sorted_input, codec, callback);
}
BlockInputStreamPtr SortedBlocksWriter::streamFromFile(const TmpFilePtr & file) const
{
    return std::make_shared<TemporaryFileLazyInputStream>(file->path(), sample_block);
}
String SortedBlocksWriter::getPath() const
{
    return volume->getDisk()->getPath();
}
Block SortedBlocksBuffer::exchange(Block && block)