跳到主要内容

BITMAP_HASH64

描述

对任意类型的输入计算 64 位的哈希值,返回包含该哈希值的 Bitmap。

语法

bitmap_hash64(<expr>)

参数

参数描述
<expr>任何值或字段表达式

返回值

包含参数 <expr> 的 64 位 hash 值的 Bitmap。

示例

计算一个值的 64 位哈希值,你可以使用:

select bitmap_to_string(bitmap_hash64('hello'));

结果如下:

+------------------------------------------+
| bitmap_to_string(bitmap_hash64('hello')) |
+------------------------------------------+
| 15231136565543391023 |
+------------------------------------------+