class SummaryAggregatorFactory {

	@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);
	}

}