Files
doris/docs/documentation/cn/sql-reference/sql-functions/bitmap-functions/bitmap_and.md
Dayue Gao ccaa97a5ac Make bitmap functions accept any expression that returns bitmap (#2728)
This CL make bitmap_count, bitmap_union, and bitmap_union_count accept any expression whose return type is bitmap as input so that we can support flexible bitmap expression such as bitmap_count(bitmap_and(to_bitmap(1), to_bitmap(2))).

This CL also create separate documentation for each bitmap UDF to conform with other functions.
2020-01-11 14:02:12 +08:00

1.2 KiB

bitmap_and

description

Syntax

BITMAP BITMAP_AND(BITMAP lhs, BITMAP rhs)

计算两个输入bitmap的交集,返回新的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