@Override
  public Object terminate() {
    double sum = 0;
    for (Object o : distinct) {
      sum += ((Number) o).doubleValue();
    }
    return downCast(sum);
  }
The input data is the Set of values(distinct) received from each of the bucket nodes.
geode-core/src/main/java/org/apache/geode/cache/query/internal/aggregate/SumDistinctPRQueryNode.java