Skip to main content
Hashes a value using MurmurHash3 and assigns it to a bucket number, according to the Iceberg partition transforms specification.

Syntax

Parameters

Return type

INTEGER Returns a bucket number from 0 to num_buckets - 1.

Remarks

The ICEBERG_BUCKET function can be used in the PARTITION BY clause of CREATE ICEBERG TABLE commands.
The bucket number is calculated by applying MurmurHash3 to the value, then taking the modulo with the number of buckets. The hash calculation follows the Iceberg 32-bit hash requirements. The <num_buckets> parameter must be a positive constant value. Using zero, negative values, or non-constant expressions results in an error.

Example

Rows: 1Execution time: 5.11ms