Skip to main content

MURMUR_HASH3_32

Description

Calculate 32-bit murmur3 hash value

-Note: When calculating hash values, it is recommended to use xxhash_32 instead of murmur_hash3_32

Syntax

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

Parameters

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

Return Value

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

-When the parameter is NULL, it returns NULL

Examples

select murmur_hash3_32(null), murmur_hash3_32("hello"), murmur_hash3_32("hello", "world");
+-----------------------+--------------------------+-----------------------------------+
| murmur_hash3_32(NULL) | murmur_hash3_32('hello') | murmur_hash3_32('hello', 'world') |
+-----------------------+--------------------------+-----------------------------------+
| NULL | 1321743225 | 984713481 |
+-----------------------+--------------------------+-----------------------------------+