@Override
    protected VectorAggregationBufferRow allocateAggregationBuffer() throws HiveException {
      VectorAggregationBufferRow bufferSet;
      if (reusableAggregationBufferRows.size() > 0) {
        bufferSet = reusableAggregationBufferRows.remove();
        bufferSet.setVersionAndIndex(0, 0);
        for (int i = 0; i < aggregators.length; i++) {
          aggregators[i].reset(bufferSet.getAggregationBuffer(i));
        }
        return bufferSet;
      } else {
        return super.allocateAggregationBuffer();
      }
    }
Adjust for grouping sets. For grouping sets, input records are processed 'n' number of times.
Ref processBatch(). Ensure that reduction is super effective, otherwise they become
memory intensive.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorGroupByOperator.java