@Override public void aggregateInput(AggregationBuffer agg, VectorizedRowBatch batch) throws HiveException { inputExpression.evaluate(batch); ColumnVector inputVector = batch.cols[this.inputExpression.getOutputColumnNum()]; int batchSize = batch.size; if (batchSize == 0) { return; } Aggregation myagg = (Aggregation)agg; if (inputVector.isRepeating) { if (inputVector.noNulls || !inputVector.isNull[0]) { myagg.count += batchSize; } return; } if (inputVector.noNulls) { myagg.count += batchSize; return; } else if (!batch.selectedInUse) { iterateNoSelectionHasNulls(myagg, batchSize, inputVector.isNull); } else { iterateSelectionHasNulls(myagg, batchSize, inputVector.isNull, batch.selected); } }
@Override public void aggregateInput(AggregationBuffer agg, VectorizedRowBatch batch) throws HiveException { inputExpression.evaluate(batch); ColumnVector inputVector = batch.cols[this.inputExpression.getOutputColumn()]; int batchSize = batch.size; if (batchSize == 0) { return; } Aggregation myagg = (Aggregation)agg; if (inputVector.isRepeating) { if (inputVector.noNulls || !inputVector.isNull[0]) { myagg.count += batchSize; } return; } if (inputVector.noNulls) { myagg.count += batchSize; return; } else if (!batch.selectedInUse) { iterateNoSelectionHasNulls(myagg, batchSize, inputVector.isNull); } else { iterateSelectionHasNulls(myagg, batchSize, inputVector.isNull, batch.selected); } }
@Override public void aggregateInput(AggregationBuffer agg, VectorizedRowBatch batch) throws HiveException { inputExpression.evaluate(batch); ColumnVector inputVector = batch.cols[this.inputExpression.getOutputColumn()]; int batchSize = batch.size; if (batchSize == 0) { return; } Aggregation myagg = (Aggregation)agg; if (inputVector.isRepeating) { if (inputVector.noNulls || !inputVector.isNull[0]) { myagg.count += batchSize; } return; } if (inputVector.noNulls) { myagg.count += batchSize; return; } else if (!batch.selectedInUse) { iterateNoSelectionHasNulls(myagg, batchSize, inputVector.isNull); } else { iterateSelectionHasNulls(myagg, batchSize, inputVector.isNull, batch.selected); } }