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

XXHASH_64

描述

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

-注:经过测试 xxhash_64 的性能大约是 murmur_hash3_64 的 2 倍,所以在计算 hash 值时,更推荐使用xxhash_64,而不是murmur_hash3_64

语法

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

参数

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

返回值

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

举例

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