presto-main/src/main/java/io/prestosql/operator/aggregation/arrayagg/ArrayAggregationStateFactory.java/ArrayAggregationStateFactory/getGroupedStateClass
class ArrayAggregationStateFactory:    @Override
    public Class<? extends ArrayAggregationState> getGroupedStateClass()
    {
        switch (mode) {
            case NEW:
                return GroupArrayAggregationState.class;
            case LEGACY:
                return LegacyArrayAggregationGroupState.class;
            default:
                throw new PrestoException(FUNCTION_IMPLEMENTATION_ERROR, format("Unexpected group enum type %s", mode));
        }
    }