bitmap_subset_limit
Descriptionβ
Intercepts a specified number of elements from a BITMAP value with element value starting from start range. The output elements are a subset of src.
This function is mainly used for scenarios such as paginated queries. It is supported from v3.1.
This function is similar to sub_bitmap. The difference is that this function intercepts elements starting from an element value (start_range) whereas sub_bitmap intercepts elements starting from an offset.
Syntaxβ
BITMAP bitmap_subset_limit(BITMAP src, BIGINT start_range, BIGINT limit)
Parametersβ
src: the BITMAP value from which to obtain elements.start_range: the start range to intercept elements. It must be a BIGINT value. If the specified start range exceeds the maximum element of the BITMAP value andlimitis positive, NULL is returned. See Example 4.limit: the number of elements to obtain starting fromstart_range. Negative limits are counted from right to left. If the number of matching elements is less than the value oflimit, all the matching elements are returned.
Return valueβ
Returns a value of the BITMAP type. NULL is returned if any of the input parameters is invalid.
Usage notesβ
- The subset elements include
start range. - Negative limits are counted from right to left. See example 3.