Class BucketFunction
- java.lang.Object
 - 
- org.apache.iceberg.spark.functions.BucketFunction
 
 
- 
- All Implemented Interfaces:
 java.io.Serializable,org.apache.spark.sql.connector.catalog.functions.Function,org.apache.spark.sql.connector.catalog.functions.UnboundFunction
public class BucketFunction extends java.lang.Object implements org.apache.spark.sql.connector.catalog.functions.UnboundFunctionA 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:
 - Serialized Form
 
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBucketFunction.BucketBasestatic classBucketFunction.BucketBinarystatic classBucketFunction.BucketDecimalstatic classBucketFunction.BucketIntstatic classBucketFunction.BucketLongstatic classBucketFunction.BucketString 
- 
Constructor Summary
Constructors Constructor Description BucketFunction() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.spark.sql.connector.catalog.functions.BoundFunctionbind(org.apache.spark.sql.types.StructType inputType)java.lang.Stringdescription()java.lang.Stringname() 
 - 
 
- 
- 
Method Detail
- 
bind
public org.apache.spark.sql.connector.catalog.functions.BoundFunction bind(org.apache.spark.sql.types.StructType inputType)
- Specified by:
 bindin interfaceorg.apache.spark.sql.connector.catalog.functions.UnboundFunction
 
- 
description
public java.lang.String description()
- Specified by:
 descriptionin interfaceorg.apache.spark.sql.connector.catalog.functions.UnboundFunction
 
- 
name
public java.lang.String name()
- Specified by:
 namein interfaceorg.apache.spark.sql.connector.catalog.functions.Function
 
 - 
 
 -