hashes · API

hashes.murmur3

MurmurHash3_x86_32, plus the Iceberg Appendix-B pre-hash wrappers.

Iceberg's bucket[N] partition transform is (hash(v) & Int32.MAX) % N where hash is MurmurHash3 x86-32 with seed 0 over a type-specific byte serialization (spec: https://iceberg.apache.org/spec/#appendix-b-32-bit-hash-requirements).

Functions

murmur3_x86_32

def murmur3_x86_32(data: Span[UInt8], seed: UInt32 = UInt32(0)) -> UInt32

iceberg_hash_long

def iceberg_hash_long(v: Int64) -> Int32

iceberg_hash_int

def iceberg_hash_int(v: Int32) -> Int32

iceberg_hash_string

def iceberg_hash_string(s: StringSpan) -> Int32

iceberg_hash_bytes

def iceberg_hash_bytes(data: Span[UInt8]) -> Int32

iceberg_hash_uuid

def iceberg_hash_uuid(hi: UInt64, lo: UInt64) -> Int32

iceberg_hash_decimal

def iceberg_hash_decimal(unscaled: Int64) -> Int32

iceberg_bucket

def iceberg_bucket(hash: UInt32, n: Int) -> Int