VeloDB Cloud
SQL Manual
Functions
bitmap-functions
bitmap_subset_in_range

bitmap_subset_in_range

Description

Syntax:

BITMAP BITMAP_SUBSET_IN_RANGE(BITMAP src, BIGINT range_start, BIGINT range_end)

This function returns the subset in the specified range of the bitmap (excluding the range_end).

Example

mysql> select bitmap_to_string(bitmap_subset_in_range(bitmap_from_string('1,2,3,4,5'), 0, 9)) value;
+-----------+
| value     |
+-----------+
| 1,2,3,4,5 |
+-----------+

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

Keywords

BITMAP_SUBSET_IN_RANGE,BITMAP_SUBSET,BITMAP