bitmap_hash

Description

Syntax

BITMAP BITMAP_HASH(expr)

Calculates a 32-bit hash value for any type of input and return the bitmap containing the hash value. It is mainly used for load task to import non-integer fields into the bitmap field of the CelerData table. For example:

cat data | curl --location-trusted -u user:passwd -T - \
    -H "columns: dt,page,device_id, device_id=bitmap_hash(device_id)" \
    http://host:8410/api/test/testDb/_stream_load

Examples

MySQL > select bitmap_count(bitmap_hash('hello'));
+------------------------------------+
| bitmap_count(bitmap_hash('hello')) |
+------------------------------------+
|                                  1 |
+------------------------------------+

keyword

BITMAP_HASH,BITMAP