Class BucketFunction
java.lang.Object
org.apache.iceberg.spark.functions.BucketFunction
- All Implemented Interfaces:
- Serializable,- org.apache.spark.sql.connector.catalog.functions.Function,- org.apache.spark.sql.connector.catalog.functions.UnboundFunction
public class BucketFunction
extends Object
implements org.apache.spark.sql.connector.catalog.functions.UnboundFunction
A Spark function implementation for the Iceberg bucket transform.
 
Example usage: SELECT system.bucket(128, 'abc'), which returns the bucket 122.
 
Note that for performance reasons, the given input number of buckets is not validated in the implementations used in code-gen. The number of buckets must be positive to give meaningful results.
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic class
- 
Constructor SummaryConstructors
- 
Method Summary
- 
Constructor Details- 
BucketFunctionpublic BucketFunction()
 
- 
- 
Method Details- 
bindpublic org.apache.spark.sql.connector.catalog.functions.BoundFunction bind(org.apache.spark.sql.types.StructType inputType) - Specified by:
- bindin interface- org.apache.spark.sql.connector.catalog.functions.UnboundFunction
 
- 
description- Specified by:
- descriptionin interface- org.apache.spark.sql.connector.catalog.functions.UnboundFunction
 
- 
name- Specified by:
- namein interface- org.apache.spark.sql.connector.catalog.functions.Function
 
 
-