use of org.apache.datasketches.quantiles.DoublesUnion in project druid by druid-io.
the class DoublesSketchMergeVectorAggregator method aggregate.
@Override
public void aggregate(final ByteBuffer buf, final int position, final int startRow, final int endRow) {
final Object[] vector = selector.getObjectVector();
final DoublesUnion union = helper.getSketchAtPosition(buf, position);
DoublesSketches.handleMaxStreamLengthLimit(() -> {
for (int i = startRow; i < endRow; i++) {
final DoublesSketch sketch = (DoublesSketch) vector[i];
if (sketch != null) {
union.update(sketch);
}
}
});
}
Aggregations