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

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

rb_xor_agg(roaringbitmap)

描述:将分组内的roaringbitmap按照异或的逻辑组合成一个roaringbitmap。

示例:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
SELECT a, rb_to_array(rb_xor_agg(b)) FROM r1 GROUP BY a ORDER BY a;
a   | rb_to_array
----+-------------
 1  | {}
 2  | {5}
 3  | {9}
 4  | {13}
 5  | {17}
 6  | {1}
 7  | {5}
 8  | {9}
 9  | {13}
 10 | {17}
(10 rows)
support.huaweicloud.com/sqlreference-820-dws/dws_06_0324.html