presto-main/src/main/java/io/prestosql/operator/HashAggregationOperator.java/HashAggregationOperator/needsInput
class HashAggregationOperator:    @Override
    public boolean needsInput()
    {
        if (finishing || outputPages != null) {
            return false;
        }
        else if (aggregationBuilder != null && aggregationBuilder.isFull()) {
            return false;
        }
        else {
            return unfinishedWork == null;
        }
    }