Removes a specified value from a Bitmap column.
BITMAP_REMOVE(<bitmap>, <value>)
| Parameter | Description |
|---|---|
<bitmap> | The Bitmap value |
<value> | The value to remove |
Returns the Bitmap after removing the specified value.
Returns the original Bitmap if the value to be removed does not exist;
Returns NULL if the value to be removed is NULL.
To remove a value from a Bitmap:
select bitmap_to_string(bitmap_remove(bitmap_from_string('1, 2, 3'), 3)) res;
The result will be:
+------+ | res | +------+ | 1,2 | +------+
To remove a NULL value from a Bitmap:
select bitmap_to_string(bitmap_remove(bitmap_from_string('1, 2, 3'), null)) res;
The result will be:
+------+ | res | +------+ | NULL | +------+