APACHE_DATASKETCHES_HLL_BUILD function is used to create a new HLL (HyperLogLog) sketch from a dataset.
This is particularly useful for large datasets where exact counting is computationally expensive.
Multiple sketches can be merged to a single sketch using the aggregate
function APACHE_DATASKETCHES_HLL_MERGE.
To estimate the final distinct count value from a sketch, the scalar
function APACHE_DATASKETCHES_HLL_ESTIMATE can be
used.
APACHE_DATASKETCHES_HLL_BUILD requires less memory than exact count distinct aggregation, but also introduces
statistical error. For more information
see Apache HyperLogLog sketch docs.
Syntax
Parameters
Return Type
BYTEA