Skip to main content
VeloDB Cloud 4.x·Apache Doris 3.x·"Since X.Y" tags refer to Doris versionsversion mapping →

BITMAP_CONTAINS

Description

Calculates whether the input value is in the BITMAP and returns a boolean value.

Syntax

BITMAP_CONTAINS(<bitmap>, <bigint>)

Parameters

ParameterDescription
<bitmap>BITMAP collection
<bitint>The integer to be checked for existence

Return Value

Returns a boolean

  • If the parameter is empty, returns NULL

Examples

select bitmap_contains(to_bitmap(1),2) cnt1, bitmap_contains(to_bitmap(1),1) cnt2;
+------+------+
| cnt1 | cnt2 |
+------+------+
| 0 | 1 |
+------+------+