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
return Status::Ready;
            if (!in->isFinished() && need_input(input_num))
                need_data = true;
        }
        if (finished)
        {
            all_inputs_finished = true;
            break;
        }
        if (need_data)
            return Status::NeedData;
    }
    if (pushed_to_output)
        return Status::PortFull;
    if (has_two_level)
    {
        if (tryPushTwoLevelData())
            return Status::PortFull;
        
        
        if (!all_inputs_finished) 
            throw Exception("GroupingAggregatedTransform has read new two-level bucket, but couldn't push it.",
                            ErrorCodes::LOGICAL_ERROR);
    }
    else
    {
        if (!all_inputs_finished) 
            throw Exception("GroupingAggregatedTransform should have read all chunks for single level aggregation, "
                            "but not all of the inputs are finished.", ErrorCodes::LOGICAL_ERROR);
        if (tryPushSingleLevelData())