Skip to main content

MURMUR_HASH3_64

Description

Calculate 64-bit murmur3 hash value

-Note: After testing, the performance of xxhash_64 is about twice that of murmur_hash3_64, so when calculating hash values, it is recommended to use xxhash_64 instead of murmur_hash3_64.

Syntax

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

Parameters

parameterdescription
<str>The 64-bit murmur3 hash value to be calculated

Return Value

Returns the 64-bit murmur3 hash of the input string。

Examples

select murmur_hash3_64(null), murmur_hash3_64("hello"), murmur_hash3_64("hello", "world");
+-----------------------+--------------------------+-----------------------------------+
| murmur_hash3_64(NULL) | murmur_hash3_64('hello') | murmur_hash3_64('hello', 'world') |
+-----------------------+--------------------------+-----------------------------------+
| NULL | -3215607508166160593 | 3583109472027628045 |
+-----------------------+--------------------------+-----------------------------------+