v.19.16New Feature

Add Aggregate Functions Groupbitmapand, -or, -xor for Bitmap Columns

Add aggregate functions groupBitmapAnd, -Or, -Xor for bitmap columns. #7109 (Zhichang Yu)
Added new aggregate functions groupBitmapAnd, groupBitmapOr, and groupBitmapXor for efficient bitwise operations on bitmap columns.

Why it matters

These functions provide efficient aggregation using bitwise AND, OR, and XOR operations on bitmap data types, allowing users to perform set intersections, unions, and symmetric differences within bitmap columns. This enhances analytics capabilities on bitmap data by enabling complex aggregations directly in ClickHouse.

How to use it

Use the aggregate functions groupBitmapAnd(column), groupBitmapOr(column), or groupBitmapXor(column) in your SELECT queries to perform bitwise aggregation on bitmap columns. For example:

SELECT groupBitmapAnd(bitmap_column) FROM table_name;
SELECT groupBitmapOr(bitmap_column) FROM table_name;
SELECT groupBitmapXor(bitmap_column) FROM table_name;