Skip to content

MurmurHash3 functions in the Hashfuncs DuckDB extension

Function category

MurmurHash3

3 functions

Austin Appleby's [MurmurHash3](https://github.com/aappleby/smhasher) — a battle-tested non-cryptographic hash widely used in distributed systems including [Apache Cassandra](https://cassandra.apache.org/_/index.html), [Apache Spark](https://spark.apache.org/), and many partitioner implementations. Choose [`murmurhash3_32`](#murmurhash3_32), [`murmurhash3_128`](#murmurhash3_128), or [`murmurhash3_x64_128`](#murmurhash3_x64_128) when you need to interoperate with an existing MurmurHash3-based consumer.

murmurhash3_128

Scalar function MurmurHash3
Signature
2 overloaded forms · click to inspect
Arguments (Positional)
Argument value Type ANY Mode Positional Description
Description
1 128-bit on x86
SELECT murmurhash3_128('hello world');

Output

murmurhash3_128('hello world')
206095855024402301784664199839047883400
2 Seeded
SELECT murmurhash3_128('hello world', 42);

Output

murmurhash3_128('hello world', 42)
49935197742640446573784908445156827108

murmurhash3_32

Scalar function MurmurHash3
Signature
2 overloaded forms · click to inspect
Arguments (Positional)
Argument value Type ANY Mode Positional Description
Description
1 Default
SELECT murmurhash3_32('hello world');

Output

murmurhash3_32('hello world')
1586663183
2 Seeded
SELECT murmurhash3_32('hello world', 123);

Output

murmurhash3_32('hello world', 123)
679062093

murmurhash3_x64_128

Scalar function MurmurHash3
Signature
2 overloaded forms · click to inspect
Arguments (Positional)
Argument value Type ANY Mode Positional Description
Description
1 128-bit hash optimized for x64
SELECT murmurhash3_x64_128('hello world');

Output

murmurhash3_x64_128('hello world')
228083453807047072434243676435732455694
2 Seeded
SELECT murmurhash3_x64_128('hello world', 42);

Output

murmurhash3_x64_128('hello world', 42)
177772143293161058141827116100740741312