Back to Starrocks

bitmap_or

docs/en/sql-reference/sql-functions/bitmap-functions/bitmap_or.md

4.1.0446 B
Original Source

bitmap_or

Calculates the union of two input bitmaps and return a new bitmap.

Syntax

Haskell
BITMAP BITMAP_OR(BITMAP lhs, BITMAP rhs)

Examples

Plain
MySQL > select bitmap_count(bitmap_or(to_bitmap(1), to_bitmap(2))) cnt;
+------+
| cnt  |
+------+
|    2 |
+------+

MySQL > select bitmap_count(bitmap_or(to_bitmap(1), to_bitmap(1))) cnt;
+------+
| cnt  |
+------+
|    1 |
+------+

keyword

BITMAP_OR,BITMAP