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.
- If the parameter has a NULL value, it returns NULL
Examplesβ
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 |
+------+