> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# bitmap_andnot

> 返回存在于第一个 Bitmap 中但不存在于第二个 Bitmap 中的值。

计算两个输入的 bitmap 的差集。差集是指包含所有存在于第一个集合且不存在于第二个集合的元素的集合。

## 语法

```Haskell theme={null}
bitmap_andnot(lhs, rhs)
```

## 参数说明

`lhs`: 支持的数据类型为 BITMAP。

`rhs`: 支持的数据类型为 BITMAP。

## 返回值说明

返回值的数据类型为 BITMAP。

## 示例

```plain text theme={null}
select bitmap_to_string(bitmap_andnot(bitmap_from_string('1, 3'), bitmap_from_string('2'))) cnt;
+------+
|cnt   |
+------+
|1,3   |
+------+

select bitmap_to_string(bitmap_andnot(bitmap_from_string('1,3,5'), bitmap_from_string('1'))) cnt;
+------+
|cnt   |
+------+
|3,5   |
+------+
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.