SelectDB Enterprise
参考手册
SQL 函数
标量函数
加密和信息摘要函数
XXHASH_32

XXHASH_32

描述

计算输入字符串的 32 位 xxhash 值

-注:在计算 hash 值时,更推荐使用xxhash_32,而不是murmur_hash3_32

语法

XXHASH_32( <str> [ , <str> ... ] )

参数

参数说明
<str>需要被计算 32 位 xxhash 的值

返回值

返回输入字符串的 32 位 xxhash 值。

举例

select xxhash_32(NULL), xxhash_32("hello"), xxhash_32("hello", "world");
+-----------------+--------------------+-----------------------------+
| xxhash_32(NULL) | xxhash_32('hello') | xxhash_32('hello', 'world') |
+-----------------+--------------------+-----------------------------+
|            NULL |          -83855367 |                  -920844969 |
+-----------------+--------------------+-----------------------------+
© 2025 北京飞轮数据科技有限公司 京ICP备2022004029号 | Apache、Apache Doris 以及相关开源项目名称均为 Apache 基金会商标