APACHE_DATASKETCHES_HLL_ESTIMATE function is used to estimate the cardinality (number of unique elements) of a dataset represented by an HLL (HyperLogLog) sketch. This is particularly useful for large datasets where exact counting is computationally expensive.
Syntax
Parameters
Return Type
BIGINT
Error Handling
If the input expression is not a valid Apache DataSketches HLL sketches, the function will raise an error. Ensure that the input is correctly formatted and generated by the APACHE_DATASKETCHES_HLL_BUILD function. The sketch is validated before it is read. A sketch whose header fields disagree with its contents (coupon counts, the exception table, the minimum register value and its count) is rejected withInvalid Apache DataSketches HLL sketch: <reason>. This includes a sketch written by another implementation that stores those fields differently.