DATASKETCHES_HLL_ESTIMATE
functionsupportedCore SQL functionsReturns the cardinality estimate for the given sketch. This function is a version of the HLL HyperLogLog function that can read binary sketches in the format used by Apache DataSketches. For more information, see the Apache DataSketches documentation. A sketch produced by the DATASKETCHES_HLL_COMBINE function can be used to compute a cardinality estimate using the DATASKETCHES_HLL_ESTIMATE function.
Syntax
DATASKETCHES_HLL_ESTIMATE( <binary_sketch> )
Parameters
| Name | Required | Description |
|---|---|---|
binary_sketch | required | An expression that contains sketch information in binary format. |
Returns
The function returns a value of type DOUBLE. If the input is empty, the output is 0.0. Note This function returns a value of a different type than the HLL_ESTIMATE function, which returns an INTEGER value.