数据仓库服务 GAUSSDB(DWS)-Roaring Bitmap聚合函数:rb_build_agg(int)

时间:2024-01-26 16:15:18

rb_build_agg(int)

描述:将分组内的int值聚合成一个roaringbitmap值。

返回值类型:roaringbitmap

示例:

1
2
3
4
5
6
CREATE TABLE t1 (a int ,b int);
NOTICE:  The 'DISTRIBUTE BY' clause is not specified. Using round-robin as the distribution mode by default.
HINT:  Please use 'DISTRIBUTE BY' clause to specify suitable data distribution column.
CREATE TABLE
INSERT INTO t1 SELECT generate_series(1,10),generate_series(1,20,2);
INSERT 0 10
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
SELECT rb_iterate(rb_build_agg(b)) FROM t1;
rb_iterate
------------
1
3
5
7
9
11
13
15
17
19
(10 rows)
support.huaweicloud.com/sqlreference-820-dws/dws_06_0324.html