1 BITMAP_AND(BITMAP lhs, BITMAP rhs)
计算两个输入bitmap的交集,返回新的bitmap.
select bitmap_count(bitmap_and(to_bitmap(1), to_bitmap(2))) cnt;
select bitmap_count(bitmap_and(to_bitmap(1), to_bitmap(1))) cnt;
2 BITMAP_CONTAINS(BITMAP bitmap, BIGINT input)
计算输入值是否在Bitmap列中,返回值是Boolean值.
select bitmap_contains(to_bitmap(1),2) cnt;
select bitmap_contains(to_bitmap(1),1) cnt;