@Override
  public Object getGroupResult() {
    doLastBatchWork(); // make sure we have a fresh avg
    return avg;
  }
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