DISTINCTCOUNTULL
The UltraLogLog Sketch from Dynatrace is a variant of HyperLogLog and is used for approximate distinct counts. The UltraLogLog sketch shares many of the same properties of a typical HyperLogLog sketch but requires less space and also provides a simpler and faster estimator.
Pinot uses an production-ready Java implementation available in Hash4j available under the Apache license.
For exact distinct counting, see DISTINCTCOUNT.
Signature
distinctCountULL(<ullSketchColumn>, <ullSketchPrecision>) -> Long
ullSketchColumn(required): Name of the column to aggregate on.ullSketchPrecision(optional): p which is the precision parameter, which controls both the size and accuracy of the sketch. If not supplied, the Helix default is used.
The input column can be single-value or multi-value. For a multi-value column, Pinot adds every value in each row to the sketch.
With advanced null handling enabled, Pinot skips null rows. Without advanced null handling, the column's configured default null value contributes to the sketch. The function returns 0 when no non-null rows contribute.
Usage examples
These examples are based on the Batch Quick Start.
select distinctCountULL(teamID) AS value
from baseballStats 150
select distinctCountULL(teamID, 14) AS value
from baseballStats 149
Last updated
Was this helpful?

