Found in stress test: https://gist.github.com/alesapin/5cd6b8901488a1f170d5ef389900a534
Report: https://s3.amazonaws.com/clickhouse-test-reports/31158/7fb9a42b119b6c3eba1784caaabde51c1ded3384/stress_tests__debug__actions_.html
{
    if (!consume_started)
    {
        consume_started = true;
        LOG_TRACE(log, "Reading blocks of partially aggregated data.");
    }
    total_input_rows += chunk.getNumRows();
    ++total_input_blocks;
    const auto & info = chunk.getChunkInfo();
    if (!info)
        throw Exception("Chunk info was not set for chunk in MergingAggregatedTransform.", ErrorCodes::LOGICAL_ERROR);
    const auto * agg_info = typeid_cast<const AggregatedChunkInfo *>(info.get());
    if (!agg_info)
        throw Exception("Chunk should have AggregatedChunkInfo in MergingAggregatedTransform.", ErrorCodes::LOGICAL_ERROR);
    /** If the remote servers used a two-level aggregation method,
      *  then blocks will contain information about the number of the bucket.
      * Then the calculations can be parallelized by buckets.
      * We decompose the blocks to the bucket numbers indicated in them.
      */
    auto block = getInputPort().getHeader().cloneWithColumns(chunk.getColumns());
    block.info.is_overflows = agg_info->is_overflows;
    block.info.bucket_num = agg_info->bucket_num;
    bucket_to_blocks[agg_info->bucket_num].emplace_back(std::move(block));
}
Chunk MergingAggregatedTransform::generate()