private void iterateNoNullsRepeatingWithAggregationSelection( VectorAggregationBufferRow[] aggregationBufferSets, int bufferIndex, double value, int batchSize) { for (int i=0; i < batchSize; ++i) { Aggregation myagg = getCurrentAggregationBuffer( aggregationBufferSets, bufferIndex, i); myagg.avgValue(value); } }
public VectorUDAFAvgTimestamp(VectorAggregationDesc vecAggrDesc) { super(vecAggrDesc); Preconditions.checkState(this.mode == GenericUDAFEvaluator.Mode.PARTIAL1); init(); }
iterateNoSelectionNoNulls(myagg, inputColVector, batchSize); iterateNoSelectionHasNulls(myagg, inputColVector, batchSize, inputColVector.isNull); iterateSelectionNoNulls(myagg, inputColVector, batchSize, batch.selected); iterateSelectionHasNulls(myagg, inputColVector, batchSize, inputColVector.isNull, batch.selected);
iterateNoNullsRepeatingWithAggregationSelection( aggregationBufferSets, bufferIndex, inputColVector.getDouble(0), } else { if (batch.selectedInUse) { iterateNoNullsSelectionWithAggregationSelection( aggregationBufferSets, bufferIndex, inputColVector, batch.selected, batchSize); } else { iterateNoNullsWithAggregationSelection( aggregationBufferSets, bufferIndex, inputColVector, batchSize); iterateHasNullsRepeatingWithAggregationSelection( aggregationBufferSets, bufferIndex, inputColVector.getDouble(0), batchSize, inputColVector.isNull); } else { if (batch.selectedInUse) { iterateHasNullsSelectionWithAggregationSelection( aggregationBufferSets, bufferIndex, inputColVector, batchSize, batch.selected, inputColVector.isNull); } else { iterateHasNullsWithAggregationSelection( aggregationBufferSets, bufferIndex, inputColVector, batchSize, inputColVector.isNull);
private void iterateHasNullsRepeatingWithAggregationSelection( VectorAggregationBufferRow[] aggregationBufferSets, int bufferIndex, double value, int batchSize, boolean[] isNull) { if (isNull[0]) { return; } for (int i=0; i < batchSize; ++i) { Aggregation myagg = getCurrentAggregationBuffer( aggregationBufferSets, bufferIndex, i); myagg.avgValue(value); } }
private void iterateNoNullsWithAggregationSelection( VectorAggregationBufferRow[] aggregationBufferSets, int bufferIndex, TimestampColumnVector inputColVector, int batchSize) { for (int i=0; i < batchSize; ++i) { Aggregation myagg = getCurrentAggregationBuffer( aggregationBufferSets, bufferIndex, i); myagg.avgValue(inputColVector.getDouble(i)); } }
private void iterateNoNullsSelectionWithAggregationSelection( VectorAggregationBufferRow[] aggregationBufferSets, int bufferIndex, TimestampColumnVector inputColVector, int[] selection, int batchSize) { for (int i=0; i < batchSize; ++i) { Aggregation myagg = getCurrentAggregationBuffer( aggregationBufferSets, bufferIndex, i); myagg.avgValue( inputColVector.getDouble(selection[i])); } }
private void iterateHasNullsWithAggregationSelection( VectorAggregationBufferRow[] aggregationBufferSets, int bufferIndex, TimestampColumnVector inputColVector, int batchSize, boolean[] isNull) { for (int i=0; i < batchSize; ++i) { if (!isNull[i]) { Aggregation myagg = getCurrentAggregationBuffer( aggregationBufferSets, bufferIndex, i); myagg.avgValue(inputColVector.getDouble(i)); } } }
private void iterateHasNullsSelectionWithAggregationSelection( VectorAggregationBufferRow[] aggregationBufferSets, int bufferIndex, TimestampColumnVector inputColVector, int batchSize, int[] selection, boolean[] isNull) { for (int j=0; j < batchSize; ++j) { int i = selection[j]; if (!isNull[i]) { Aggregation myagg = getCurrentAggregationBuffer( aggregationBufferSets, bufferIndex, j); myagg.avgValue(inputColVector.getDouble(i)); } } }