bitmap_hash

description

Syntax

BITMAP BITMAP_HASH(expr)

Compute the 32-bits hash value of a expr of any type, then return a bitmap containing that hash value. Mainly be used to load non-integer value into bitmap column, e.g.,

  1. 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

example

  1. mysql> select bitmap_count(bitmap_hash('hello'));
  2. +------------------------------------+
  3. | bitmap_count(bitmap_hash('hello')) |
  4. +------------------------------------+
  5. | 1 |
  6. +------------------------------------+

keyword

  1. BITMAP_HASH,BITMAP