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

时间:2024-09-24 15:54:39

hll_add_agg(hll_hashval, int32 log2m, int32 regwidth, int64 expthresh, int32 sparseon)

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

返回值类型:hll

示例:

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