Sketch Functions
Reference documentation for approximate distinct count and sketch-based aggregation functions in Apache Pinot.
Last updated
Was this helpful?
Reference documentation for approximate distinct count and sketch-based aggregation functions in Apache Pinot.
Pinot supports several sketch-based algorithms for approximate distinct counting and summarization. These functions trade a small amount of accuracy for significant memory and performance savings at scale.
For exact distinct counting, see DISTINCTCOUNT.
The Compressed Probability Counting (CPC) Sketch enables extremely space-efficient cardinality estimation — about 40% less space than an HLL sketch of comparable accuracy.
Returns approximate distinct count using CPC sketch
Returns raw CPC sketch as hex string
HyperLogLogPlus (HLL++) provides approximate distinct counts with configurable precision (p, sp parameters).
Approximate distinct count using HLL++
Starts exact and converts to HLL++ after a threshold
HLL++ for multi-value columns
Returns serialized HLL++ sketch
Serialized HLL++ sketch for multi-value columns
The UltraLogLog Sketch from Dynatrace requires less space than HyperLogLog and provides a simpler, faster estimator. Implemented via Hash4j.
Approximate distinct count using ULL (default p=12)
Returns serialized ULL sketch
The Tuple Sketch extends the Theta Sketch with additional summary values per entry, ideal for summarizing attributes like impressions or clicks.
Distinct count from tuple sketch
Raw tuple sketch as hex
Average of summary values
Sum of summary values
Frequent items sketch for long values
Frequent items sketch for string values
Last updated
Was this helpful?
Was this helpful?

