Syntax
Parameters
| Parameter | Description | Supported input types |
|---|---|---|
<value> | The value to hash into a bucket. | INTEGER, BIGINT, TEXT, BYTEA, DATE, TIMESTAMP, TIMESTAMPTZ |
<num_buckets> | The number of buckets. Must be a positive constant. | BIGINT |
Return type
INTEGER
Returns a bucket number from 0 to num_buckets - 1.
Remarks
TheICEBERG_BUCKET function can be used in the PARTITION BY clause of CREATE ICEBERG TABLE commands.
<num_buckets> parameter must be a positive constant value. Using zero, negative values, or non-constant expressions results in an error.
Example
| bucket_partition |
|---|
| 339 |