@Override
  public Object terminate() {
    double sum = ((Number) super.terminate()).doubleValue();
    double result = sum / num;
    return downCast(result);
  }
Computes the non distinct average for replicated region based queries
geode-core/src/main/java/org/apache/geode/cache/query/internal/aggregate/Avg.java