{ “title”: “BITMAP_COUNT”, “language”: “en”, “description”: “Count the number of elements in the input BITMAP” }

Description

Count the number of elements in the input BITMAP

Syntax

BITMAP_COUNT(<bitmap>)

Parameters

ParameterDescription
<bitmap>a BITMAP

Return Value

Returns an integer

Examples

select bitmap_count(to_bitmap(1)) cnt;
+------+
| cnt  |
+------+
|    1 |
+------+
select bitmap_count(bitmap_empty()) cnt;
+------+
| cnt  |
+------+
|    0 |
+------+