数据仓库服务 GAUSSDB(DWS)-聚合函数:hll_add_agg(hll_hashval, int32 log2m, int32 regwidth)

时间:2024-10-21 16:50:41

hll_add_agg(hll_hashval, int32 log2m, int32 regwidth)

描述:把哈希后的数据按照分组放到hll中。依次指定参数log2m,regwidth。 regwidth取值范围为1~5。

返回值类型:hll

示例:

1
2
3
4
5
SELECT hll_cardinality(hll_add_agg(hll_hash_text(c), NULL, 1)) FROM t_data;
 hll_cardinality  
------------------
 496.628982624022
(1 row)
support.huaweicloud.com/sqlreference-830-dws/dws_06_0329.html