BITMAP_AND
デスクリプション
2つ以上の入力BITMAPの積集合を計算し、新しいBITMAPを返します。
Syntax
BITMAP_AND(<bitmap>, <bitmap>,[, <bitmap>...])
パラメータ
| パラメータ | 説明 |
|---|---|
<bitmap> | 積集合を求める元のBITMAPの一つ |
戻り値
BITMAPを返します
- パラメータがNULL値の場合、NULLを返します
例
select bitmap_to_string(bitmap_and(bitmap_from_string('1,2,3'), bitmap_from_string('1,2'), bitmap_from_string('1,2,3,4,5'))) as res;
+------+
| res |
+------+
| 1,2 |
+------+
select bitmap_to_string(bitmap_and(bitmap_from_string('1,2,3'), bitmap_from_string('1,2'), bitmap_from_string('1,2,3,4,5'),bitmap_empty())) as res;
+------+
| res |
+------+
| |
+------+
select bitmap_to_string(bitmap_and(bitmap_from_string('1,2,3'), bitmap_from_string('1,2'), bitmap_from_string('1,2,3,4,5'),NULL)) as res;
+------+
| res |
+------+
| NULL |
+------+