basic-lib/src/main/java/com/streamsets/pipeline/stage/processor/aggregation/aggregator/Aggregators.java
<A extends SimpleAggregator, T> Class<? extends Number> getAggregatorUnit(Class<A> klass) {
    try {
      A aggregator = (A) CONSTRUCTORS.get(klass).newInstance("forAggregatorTypeDiscoveryOnly");
      return aggregator.getValueType();
    } catch (Exception ex) {
      throw new RuntimeException(ex);
    }
  }
<A extends SimpleAggregator, T> Class<? extends Number> getAggregatorUnit(Class<A> klass) {
    try {
      A aggregator = (A) CONSTRUCTORS.get(klass).newInstance("forAggregatorTypeDiscoveryOnly");
      return aggregator.getValueType();
    } catch (Exception ex) {
      throw new RuntimeException(ex);
    }
  }
Returns the unit type of an aggregator value. Typically Long or Double.

@param klass the aggregator class.
@return the unit type of an aggregator value.