Files
doris/docs/en/sql-reference/sql-functions/bitmap-functions/bitmap_not.md
HappenLee a1808c1a71 [Function] Add BE udf bitmap_not (#5346) (#5357)
this function will return the not result of inputs two bitmap.
2021-02-07 22:39:17 +08:00

1.7 KiB

title, language
title language
bitmap_not en

bitmap_not

description

Syntax

BITMAP BITMAP_NOT(BITMAP lhs, BITMAP rhs)

Calculate the set after lhs minus rhs, return the new bitmap.

example

mysql> select bitmap_count(bitmap_not(bitmap_from_string('2,3'),bitmap_from_string('1,2,3,4'))) cnt;
+------+
| cnt  |
+------+
|    0 |
+------+

mysql> select bitmap_to_string(bitmap_not(bitmap_from_string('2,3,5'),bitmap_from_string('1,2,3,4')));
+----------------------------------------------------------------------------------------+
| bitmap_to_string(bitmap_xor(bitmap_from_string('2,3,5'), bitmap_from_string('1,2,3,4'))) |
+----------------------------------------------------------------------------------------+
| 5                                                                                      |
+----------------------------------------------------------------------------------------+

keyword

BITMAP_NOT,BITMAP