Files
doris/docs/en/sql-manual/sql-functions/bitmap-functions/bitmap_hash.md
jiafeng.zhang 267e8b67c2 [refactor][doc]The new version of the document is online (#9272)
replace the `docs/` with `new-docs/`
2022-04-28 15:22:34 +08:00

1.5 KiB

title, language
title language
bitmap_hash en

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

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

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

keyword

BITMAP_HASH,BITMAP