VeloDB Cloud
SQL Reference
SQL Functions
Scalar Functions
Bitmap Functions
BITMAP_FROM_ARRAY

BITMAP_FROM_ARRAY

Description

Converts an array of TINYINT/SMALLINT/INT/BIGINT type to a BITMAP. When the input field is illegal, the result returns NULL.

Syntax

BITMAP_FROM_ARRAY(<arr>)

Parameters

ParameterDescription
<arr>integer array

Return Value

Returns a BITMAP

  • When the input field is invalid, the result is NULL

Examples

SELECT bitmap_to_string(bitmap_from_array(array(1, 0, 1, 1, 0, 1, 0))) AS bs;
+------+
| bs   |
+------+
| 0,1  |
+------+