BITMAP_HAS_ANY
Description
Determines whether two Bitmaps share any common elements.
Syntax
BITMAP_HAS_ANY(<bitmap1>, <bitmap2>)
Parameters
Parameter | Description |
---|---|
<bitmap1> | The first Bitmap |
<bitmap2> | The second Bitmap |
Return Value
Returns true if the two Bitmaps have any common elements;
Returns false if the two Bitmaps do not have any common elements.
Examples
mysql> select bitmap_has_any(to_bitmap(1), to_bitmap(2));
+--------------------------------------------+
| bitmap_has_any(to_bitmap(1), to_bitmap(2)) |
+--------------------------------------------+
| 0 |
+--------------------------------------------+
mysql> select bitmap_has_any(to_bitmap(1), to_bitmap(1));
+--------------------------------------------+
| bitmap_has_any(to_bitmap(1), to_bitmap(1)) |
+--------------------------------------------+
| 1 |
+--------------------------------------------+