bitmap_subset_limit
Description
Syntax:
BITMAP BITMAP_SUBSET_LIMIT(BITMAP src, BIGINT range_start, BIGINT cardinality_limit)
This function generates the sub-bitmap of src
. The sub-bitmap starts from range_start
and its size is no larger than cardinality_limit
. range_start
: starting point (included) of the range; cardinality_limit
: the upper limit of cardinality of the sub-bitmap.
Example
mysql> select bitmap_to_string(bitmap_subset_limit(bitmap_from_string('1,2,3,4,5'), 0, 3)) value;
+-----------+
| value |
+-----------+
| 1,2,3 |
+-----------+
mysql> select bitmap_to_string(bitmap_subset_limit(bitmap_from_string('1,2,3,4,5'), 4, 3)) value;
+-------+
| value |
+-------+
| 4,5 |
+-------+
Keywords
BITMAP_SUBSET_LIMIT,BITMAP_SUBSET,BITMAP