protected List<AggregateFunction> initializeAggregateFunctions(
            List<AggregateExpression> expressions) {
        return mapToList(expressions, e -> e.aggregateFunction);
    }
The base class of [[SortBasedAggregationIterator]] and [[TungstenAggregationIterator]].
It mainly contains two parts:
1. It initializes aggregate functions.
2. It creates two functions, `processRow` and `generateOutput` based on [[AggregateMode]] of
its aggregate functions. `processRow` is the function to handle an input. `generateOutput`
is used to generate result.
indexr-query-opt/src/main/java/org/apache/spark/sql/execution/aggregate/AggregationIterator.java