@Override
  public SqlAggFunction getRollup() {
    return mergeAgg;
  }
Mergeable aggregate.

A mergeable aggregate is:
- accepts the same kind as inputs as the output (an X^n -&gt; X function)

Example: the SUM function is a great example; since SUM of SUM -s is the overall sum.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/functions/HiveMergeableAggregate.java