VeloDB Cloud
SQL Manual
Functions
bitmap-functions
bitmap_not

bitmap_not

Description

Syntax:

BITMAP BITMAP_NOT(BITMAP lhs, BITMAP rhs)

This function calculates the set after lhs minus rhs and returns the new bitmap.

Example

mysql> select bitmap_count(bitmap_not(bitmap_from_string('2,3'),bitmap_from_string('1,2,3,4'))) cnt;
+------+
| cnt  |
+------+
|    0 |
+------+

mysql> select bitmap_to_string(bitmap_not(bitmap_from_string('2,3,5'),bitmap_from_string('1,2,3,4')));
+----------------------------------------------------------------------------------------+
| bitmap_to_string(bitmap_xor(bitmap_from_string('2,3,5'), bitmap_from_string('1,2,3,4'))) |
+----------------------------------------------------------------------------------------+
| 5                                                                                      |
+----------------------------------------------------------------------------------------+

Keywords

BITMAP_NOT,BITMAP