@Override
  @SuppressWarnings("unchecked")
  public void onResultCalculated(Object result, Range range) {
    this.previousSum = (T) result;
    this.previousRange = range;
  }
This optimization is the vectorized counterpart of HIVE-15520.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/ptf/VectorPTFEvaluatorAbstractSum.java