Skip to main content
A function to find the intersection size (number of same elements) of two Bitmap values, without requiring the data distribution to be orthogonal. The first parameter is the Bitmap column, the second parameter is the dimension column used for filtering, and the third parameter is a variable-length parameter, meaning that different values of the filtering dimension column are taken. If there is no intersection, 0 is returned.

Syntax

Parameters

  • bitmap_column: the bitmap column to be computed.
  • column_to_filter: the name of the column to be intersected.
  • filter_values: the different values of the filtered dimension columns.

Return value

Returns a value of the BIGINT type.

Example

Create an Aggregate table with a Bitmap column user_id and insert data.
Calculate the number of same user_id corresponding to '2020-10-01' and '2020-10-02'. Two same elements (2 and 3) are found and the number 2 is returned.
Calculate the number of same user_id corresponding to '2020-10-01' and '2020-10-03'. One element 5 is found and the number 1 is returned.