Class TruncateFunction
- java.lang.Object
-
- org.apache.iceberg.spark.functions.TruncateFunction
-
- All Implemented Interfaces:
java.io.Serializable
,org.apache.spark.sql.connector.catalog.functions.Function
,org.apache.spark.sql.connector.catalog.functions.UnboundFunction
public class TruncateFunction extends java.lang.Object implements org.apache.spark.sql.connector.catalog.functions.UnboundFunction
A Spark function implementation for the Iceberg truncate transform.Example usage:
SELECT system.truncate(1, 'abc')
, which returns the String 'a'.Note that for performance reasons, the given input width is not validated in the implementations used in code-gen. The width must remain non-negative to give meaningful results.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TruncateFunction.TruncateBase<T>
static class
TruncateFunction.TruncateBigInt
static class
TruncateFunction.TruncateBinary
static class
TruncateFunction.TruncateDecimal
static class
TruncateFunction.TruncateInt
static class
TruncateFunction.TruncateSmallInt
static class
TruncateFunction.TruncateString
static class
TruncateFunction.TruncateTinyInt
-
Constructor Summary
Constructors Constructor Description TruncateFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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()
-
-
-
Method Detail
-
bind
public org.apache.spark.sql.connector.catalog.functions.BoundFunction bind(org.apache.spark.sql.types.StructType inputType)
- Specified by:
bind
in interfaceorg.apache.spark.sql.connector.catalog.functions.UnboundFunction
-
description
public java.lang.String description()
- Specified by:
description
in interfaceorg.apache.spark.sql.connector.catalog.functions.UnboundFunction
-
name
public java.lang.String name()
- Specified by:
name
in interfaceorg.apache.spark.sql.connector.catalog.functions.Function
-
-