presto-main/src/main/java/io/prestosql/operator/aggregation/ReduceAggregationFunction.java/ReduceAggregationFunction/specialize
class ReduceAggregationFunction:    @Override
    public InternalAggregationFunction specialize(BoundVariables boundVariables, int arity, Metadata metadata)
    {
        Type inputType = boundVariables.getTypeVariable("T");
        Type stateType = boundVariables.getTypeVariable("S");
        return generateAggregation(inputType, stateType);
    }