@SuppressWarnings("unchecked")
    public static <R extends Tuple> TupleSummaryAggregator<R> create(TupleTypeInfoBase<?> inType) {
        Aggregator[] columnAggregators = new Aggregator[inType.getArity()];
        for (int field = 0; field < inType.getArity(); field++) {
            Class clazz = inType.getTypeAt(field).getTypeClass();
            columnAggregators[field] = SummaryAggregatorFactory.create(clazz);
        }
        return new TupleSummaryAggregator<>(columnAggregators);
    }
@Test
    void testCreate() {
        // supported primitive types
        assertThat(SummaryAggregatorFactory.create(String.class).getClass())
                .isEqualTo(StringSummaryAggregator.class);
        assertThat(SummaryAggregatorFactory.create(Short.class).getClass())
                .isEqualTo(ShortSummaryAggregator.class);
        assertThat(SummaryAggregatorFactory.create(Integer.class).getClass())
                .isEqualTo(IntegerSummaryAggregator.class);
        assertThat(SummaryAggregatorFactory.create(Long.class).getClass())
                .isEqualTo(LongSummaryAggregator.class);
        assertThat(SummaryAggregatorFactory.create(Float.class).getClass())
                .isEqualTo(FloatSummaryAggregator.class);
        assertThat(SummaryAggregatorFactory.create(Double.class).getClass())
                .isEqualTo(DoubleSummaryAggregator.class);
        assertThat(SummaryAggregatorFactory.create(Boolean.class).getClass())
                .isEqualTo(BooleanSummaryAggregator.class);

        // supported value types
        assertThat(SummaryAggregatorFactory.create(StringValue.class).getClass())
                .isEqualTo(ValueSummaryAggregator.StringValueSummaryAggregator.class);
        assertThat(SummaryAggregatorFactory.create(ShortValue.class).getClass())
                .isEqualTo(ValueSummaryAggregator.ShortValueSummaryAggregator.class);
        assertThat(SummaryAggregatorFactory.create(IntValue.class).getClass())
                .isEqualTo(ValueSummaryAggregator.IntegerValueSummaryAggregator.class);
        assertThat(SummaryAggregatorFactory.create(LongValue.class).getClass())
                .isEqualTo(ValueSummaryAggregator.LongValueSummaryAggregator.class);
        assertThat(SummaryAggregatorFactory.create(FloatValue.class).getClass())
                .isEqualTo(ValueSummaryAggregator.FloatValueSummaryAggregator.class);
        assertThat(SummaryAggregatorFactory.create(DoubleValue.class).getClass())
                .isEqualTo(ValueSummaryAggregator.DoubleValueSummaryAggregator.class);
        assertThat(SummaryAggregatorFactory.create(BooleanValue.class).getClass())
                .isEqualTo(ValueSummaryAggregator.BooleanValueSummaryAggregator.class);

        // some not well supported types - these fallback to ObjectSummaryAggregator
        assertThat(SummaryAggregatorFactory.create(Object.class).getClass())
                .isEqualTo(ObjectSummaryAggregator.class);
        assertThat(SummaryAggregatorFactory.create(List.class).getClass())
                .isEqualTo(ObjectSummaryAggregator.class);
    }