diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorGroupByOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorGroupByOperator.java index d4d18ef4fa..9f81e8edfd 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorGroupByOperator.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorGroupByOperator.java @@ -180,21 +180,20 @@ public void processBatch(VectorizedRowBatch batch) throws HiveException { if (!groupingSetsPresent) { doProcessBatch(batch, false, null); - return; - } - - // 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... + } 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++) { + 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); + // NOTE: We are overwriting the constant vector value... + groupingSetsDummyVectorExpression.setLongValue(groupingSets[i]); + groupingSetsDummyVectorExpression.evaluate(batch); - doProcessBatch(batch, (i == 0), allGroupingSetsOverrideIsNulls[i]); + doProcessBatch(batch, (i == 0), allGroupingSetsOverrideIsNulls[i]); + } } if (this instanceof ProcessingModeHashAggregate) {