@Override
  public void resetEvaluator() {
    isNull = true;
    sum.set(HiveDecimal.ZERO);
    nonNullGroupCount = 0;
    avg.set(HiveDecimal.ZERO);
  }
This class evaluates streaming HiveDecimal avg() for a PTF group.

Stream average non-null column values and output sum / non-null count as we go along.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/ptf/VectorPTFEvaluatorStreamingDecimalAvg.java