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 |
+--------------------------------------------+