HLL_ESTIMATE
functionsupportedCore SQL functionsReturns the cardinality estimate for the given HyperLogLog state. A HyperLogLog state produced by HLL_ACCUMULATE and HLL_COMBINE can be used to compute a cardinality estimate using the HLL_ESTIMATE function. Thus, HLL_ESTIMATE(HLL_ACCUMULATE(…)) is equivalent to HLL(…).
Syntax
supportedpartialnot supportednot scored
Aggregate function
HLL_ESTIMATE( <state> )
Window function
HLL_ESTIMATE( <state> ) OVER ( [ PARTITION BY <expr> ] )
Parameters
| Name | Required | Description |
|---|---|---|
state | required | An expression that contains state information generated by a call to HLL_ACCUMULATE or HLL_COMBINE. |
Usage notes
- This function can be used as an aggregate function or a window function.