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

1.2 KiB

title, language
title language
bitmap_and en

bitmap_and

description

Syntax

BITMAP BITMAP_AND(BITMAP lhs, BITMAP rhs)

Compute intersection of two input bitmaps, return the new bitmap.

example

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