@Override
  public void onPartitionEnd() {
    previousSum = null;
    previousCount = 0;
    previousRange = null;
  }
This optimization is the vectorized counterpart of HIVE-15617.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/ptf/VectorPTFEvaluatorAbstractAvg.java