v.19.15New Feature

Add Bitmapsubsetlimit(bitmap, Range_start, Limit) Function, That Returns Subset of the Smallest Limit Values in Set That Is No Smaller Than Range_start

Add bitmapSubsetLimit(bitmap, range_start, limit) function, that returns subset of the smallest limit values in set that is no smaller than range_start. #6957 (Zhichang Yu)
Introduces the bitmapSubsetLimit(bitmap, range_start, limit) function, which returns a subset of the smallest values from a bitmap where the values are no smaller than range_start, limited to a maximum of limit elements.

Why it matters

This feature allows users to efficiently extract a limited subset of elements from a bitmap starting at a specified lower bound. It is useful for scenarios where users want to process or analyze only a portion of a bitmap's values within a particular range, improving query efficiency and control over data selection.

How to use it

Invoke the function in a query by passing the bitmap, the starting value (range_start), and the maximum number of elements to return (limit). Example usage:
SELECT bitmapSubsetLimit(bitmap_column, 1000, 50) FROM table_name;