Roaring bitmap judgment functions perform judgment on the input Roaring bitmap data and return a Boolean value. OceanBase Database supports the rb_is_empty() Roaring bitmap judgment function.
rb_is_empty
rb_is_empty() judges whether the input Roaring bitmap data is empty. The syntax is as follows:
rb_is_empty(rb)
The returned value 1 indicates that the input bitmap data is empty, and 0 indicates that input bitmap data is not empty.
Here are some examples:
SELECT rb_is_empty(rb_from_string(''));
+---------------------------------+
| rb_is_empty(rb_from_string('')) |
+---------------------------------+
| 1 |
+---------------------------------+
1 row in set
SELECT rb_is_empty(rb_from_string('1,2,3'));
+--------------------------------------+
| rb_is_empty(rb_from_string('1,2,3')) |
+--------------------------------------+
| 0 |
+--------------------------------------+
1 row in set