BITMAP_AGG

Overview

Aggregates a column of integer values into a single BITMAP object. Equivalent to calling TO_BITMAP on each value and then performing BITMAP_UNION. The return type is BITMAP (binary).

Syntax

BITMAP_AGG(<expr>)

Parameters

  • <expr>: A BIGINT expression or any expression that can be implicitly cast to an integer.

Examples

-- Aggregate into a BITMAP and inspect the contents with bitmap_to_string SELECT bitmap_to_string(bitmap_agg(v)) FROM (VALUES (1),(2),(3),(2)) t(v); -- 1,2,3