版本2.2.4
我们想用bitmap做用户分群功能,后面要对分群后的用户,关联维度信息发送短信
但是没找到哪个函数能把bitmap转为行,之前用clickhouse是有这个函数的
请问有类似函数吗?
Bitmap to array
Bitmap to array这个只能转为一行吧,我们想要变成一个值一行,用来跟维表关联
再unnest就可以了
感谢。最终这么实现的
select unnest from (
select bitmap_to_array(
bitmap_and((select phone_bit from testdb.tt_tag_bitmap where tag = ‘aaa’),
(select phone_bit from testdb.tt_tag_bitmap where tag = ‘bbb’))
) arr
) t , unnest(arr) ;
1赞
bitmap_to_array默认最多100万个,超过了怎么办?
bitmap 有个分页函数,可以考虑用分页函数把bitmap减小