GROUP_BITMAP_STATE
Function Description
The GROUP_BITMAP_STATE
function is used to construct a bitmap type result based on the input expression (expr). This function is typically used for grouping operations on integer type data and converting the unique values of each group into a bitmap array.
Parameter Description
- expr: The integer type expression to be processed.
Return Type
- Returns a bitmap type result.
Example
Below is an example of using the GROUP_BITMAP_STATE
function. We have a data table with two columns, c
and v
. We want to group by the values in column c
and convert the unique values in column v
of each group into a bitmap array.
After executing the above query, we will get the following result:
In this example, we can see that group a
contains two unique values 1 and 2, so the returned bitmap array is [1,2]
. Group b
only contains one unique value 3, so the returned bitmap array is [3]
.