Back to Starrocks

bitmap_and

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

4.1.0461 B
Original Source

bitmap_and

Calculates the intersection of two input bitmaps and returns the new bitmap.

Syntax

Haskell
BITMAP BITMAP_AND(BITMAP lhs, BITMAP rhs)

Examples

plain
MySQL > select bitmap_count(bitmap_and(to_bitmap(1), to_bitmap(2))) cnt;
+------+
| cnt  |
+------+
|    0 |
+------+

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

keyword

BITMAP_AND,BITMAP