Skip to main content
Aggregates values (excluding NULLs) in a column into a bitmap (multiple rows into one row).

Syntax

Parameters

col: the column whose values you want to aggregate. It must evaluate to BOOLEAN, TINYINT, SMALLINT, INT, BIGINT, and LARGEINT.

Return value

Returns a value of the BITMAP type.

Usage notes

If the value in a row is less than 0 or greater than 18446744073709551615, the value will be ignored and not added to the Bitmap (see Example 3).

Examples

Take the following data table as an example:
Example 1: Aggregate values in column c1 into one bitmap.
Example 2: Aggregate values in column c2 into one bitmap (NULLs are ignored).
Example 3: Aggregate values in column c6 into one bitmap (the last two values that exceed the value range are ignored).

Keywords

BITMAP_AGG, BITMAP