@Override 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... 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]); } }
@Override 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... 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]); } }
vrg.cols[4] = bcvn; longCve.evaluate(vrg); doubleCve.evaluate(vrg); bytesCve.evaluate(vrg); decimalCve.evaluate(vrg); nullCve.evaluate(vrg); assertTrue(lcv.isRepeating); assertTrue(dcv.isRepeating); bytesCve.evaluate(vrg); assertTrue(bcv.length[0] == alphaBytes.length); assertTrue(sameFirstKBytes(alphaBytes, bcv.vector[0], alphaBytes.length)); decimalCve.evaluate(vrg); assertTrue(25.8 == dv.vector[0].getHiveDecimal().doubleValue());