presto-main/src/main/java/io/prestosql/operator/aggregation/builder/InMemoryHashAggregationBuilder.java/Aggregator/getType
class Aggregator:        public Type getType()
        {
            if (step.isOutputPartial()) {
                return aggregation.getIntermediateType();
            }
            else {
                return aggregation.getFinalType();
            }
        }