Back to Starrocks

hll_raw_agg

docs/en/sql-reference/sql-functions/aggregate-functions/hll_raw_agg.md

4.1.0681 B
Original Source

hll_raw_agg

This function is an aggregate function that is used to aggregate HLL fields. It returns an HLL value.

Syntax

Haskell
hll_raw_agg(hll)

Parameters

hll: the HLL column that is generated by other columns or based on the loaded data.

Return value

Returns a value of the HLL type.

Examples

Plain
mysql> select k1, hll_cardinality(hll_raw_agg(v1)) from tbl group by k1;
+------+----------------------------------+
| k1   | hll_cardinality(hll_raw_agg(`v1`)) |
+------+----------------------------------+
|    2 |                                4 |
|    1 |                                3 |
+------+----------------------------------+