https://clickhouse-test-reports.s3.yandex.net/21020/2ced21c837006053542b9f04c338faebf504f413/fuzzer_asan/server.log
{
    if (is_in_memory)
        mergeInMemoryRightBlocks();
    else
        mergeFlushedRightBlocks();
}
void MergeJoin::mergeInMemoryRightBlocks()
{
    std::unique_lock lock(rwlock);
    if (right_blocks.empty())
        return;
    auto stream = std::make_shared<BlocksListBlockInputStream>(std::move(right_blocks.blocks));
    Pipe source(std::make_shared<SourceFromInputStream>(std::move(stream)));
    right_blocks.clear();
    QueryPipeline pipeline;
    pipeline.init(std::move(source));
    
    pipeline.addTransform(std::make_shared<MergeSortingTransform>(pipeline.getHeader(), right_sort_description, max_rows_in_right_block, 0, 0, 0, 0, nullptr, 0));
    auto sorted_input = PipelineExecutingBlockInputStream(std::move(pipeline));
    while (Block block = sorted_input.read())
    {
        if (!block.rows())
            continue;
        if (skip_not_intersected)
            min_max_right_blocks.emplace_back(extractMinMax(block, right_table_keys));
        right_blocks.countBlockSize(block);
        loaded_right_blocks.emplace_back(std::make_shared<Block>(std::move(block)));
    }
}
void MergeJoin::mergeFlushedRightBlocks()