哈希函数
更新时间:2021-07-12
Doris支持的哈希函数如下:
MURMUR_HASH3_32
Description
INT MURMUR_HASH3_32(VARCHAR input, ...)
- 功能:返回输入字符串的32位murmur3 hash值
- 返回类型:string类型
Example
mysql> select murmur_hash3_32(null);
+-----------------------+
| murmur_hash3_32(NULL) |
+-----------------------+
| NULL |
+-----------------------+
mysql> select murmur_hash3_32("hello");
+--------------------------+
| murmur_hash3_32('hello') |
+--------------------------+
| 1321743225 |
+--------------------------+
mysql> select murmur_hash3_32("hello", "world");
+-----------------------------------+
| murmur_hash3_32('hello', 'world') |
+-----------------------------------+
| 984713481 |
+-----------------------------------+
Keywords
MURMUR_HASH3_32,HASH