@Override
    public void processBatch(VectorizedRowBatch batch) throws HiveException {

      if (!groupingSetsPresent) {
        doProcessBatch(batch, false, null);
      } else {
        // We drive the doProcessBatch logic with the same batch but different
        // grouping set id and null variation.
        // PERFORMANCE NOTE: We do not try to reuse columns and generate the KeyWrappers anew...

        final int size = groupingSets.length;
        for (int i = 0; i < size; i++) {

          // NOTE: We are overwriting the constant vector value...
          groupingSetsDummyVectorExpression.setLongValue(groupingSets[i]);
          groupingSetsDummyVectorExpression.evaluate(batch);

          doProcessBatch(batch, (i == 0), allGroupingSetsOverrideIsNulls[i]);
        }
      }

      if (this instanceof ProcessingModeHashAggregate) {
        // Check if we should turn into streaming mode
        ((ProcessingModeHashAggregate)this).checkHashModeEfficiency();
      }
    }
The VectorAggregationBufferRow instance. This field can be shared with ProcessingMode
subclasses, where is only 1 VectorAggregationBufferRow instance needed at the same time. This
is the case for ProcessingModeGlobalAggregate, ProcessingModeReduceMergePartial,
ProcessingModeStreaming, but not for ProcessingModeHashAggregate where this field is not
used.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorGroupByOperator.java