public class BucketFunction
extends java.lang.Object
implements org.apache.spark.sql.connector.catalog.functions.UnboundFunction
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.
| Modifier and Type | Class and Description |
|---|---|
static class |
BucketFunction.BucketBase |
static class |
BucketFunction.BucketBinary |
static class |
BucketFunction.BucketDecimal |
static class |
BucketFunction.BucketInt |
static class |
BucketFunction.BucketLong |
static class |
BucketFunction.BucketString |
| Constructor and Description |
|---|
BucketFunction() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.spark.sql.connector.catalog.functions.BoundFunction |
bind(org.apache.spark.sql.types.StructType inputType) |
java.lang.String |
description() |
java.lang.String |
name() |
public org.apache.spark.sql.connector.catalog.functions.BoundFunction bind(org.apache.spark.sql.types.StructType inputType)
bind in interface org.apache.spark.sql.connector.catalog.functions.UnboundFunctionpublic java.lang.String description()
description in interface org.apache.spark.sql.connector.catalog.functions.UnboundFunctionpublic java.lang.String name()
name in interface org.apache.spark.sql.connector.catalog.functions.Function