HLL_UNION_AGG
Descriptionβ
The HLL_UNION_AGG function is an aggregate function, which is mainly used to merge multiple HyperLogLog data structures and estimate the approximate value of the combined cardinality.
Syntaxβ
hll_union_agg(<hll>)
Parametersβ
Parameters | Description |
---|---|
<hll> | The HyperLogLog type expression to be calculated |
Return Valueβ
Returns the cardinality value of type BIGINT.
Exampleβ
select HLL_UNION_AGG(uv_set) from test_uv;
+-------------------------+
| HLL_UNION_AGG(`uv_set`) |
+-------------------------+
| 17721 |
+-------------------------+