@Override
  public void resetEvaluator() {
    isGroupResultNull = true;
    sum = 0L;
    nonNullGroupCount = 0;
    avg = 0.0;
  }
This class evaluates long avg() for a PTF group.

Sum up non-null column values; group result is sum / non-null count.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/ptf/VectorPTFEvaluatorLongAvg.java