Determines whether two Bitmaps share any common elements.
BITMAP_HAS_ANY(<bitmap1>, <bitmap2>)
| Parameter | Description |
|---|---|
<bitmap1> | The first Bitmap |
<bitmap2> | The second Bitmap |
Returns true if the two Bitmaps have any common elements;
Returns false if the two Bitmaps do not have any common elements.
select bitmap_has_any(to_bitmap(1), to_bitmap(2)) res;
+------+ | res | +------+ | 0 | +------+
select bitmap_has_any(bitmap_from_string('1,2,3'), to_bitmap(1)) res;
+------+ | res | +------+ | 1 | +------+
select bitmap_has_any(bitmap_from_string('1,2,3'), NULL) as res;
+------+ | res | +------+ | NULL | +------+