public class TruncateFunction
extends java.lang.Object
implements org.apache.spark.sql.connector.catalog.functions.UnboundFunction
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.
Modifier and Type | Class and 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 and Description |
---|
TruncateFunction() |
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.UnboundFunction
public java.lang.String description()
description
in interface org.apache.spark.sql.connector.catalog.functions.UnboundFunction
public java.lang.String name()
name
in interface org.apache.spark.sql.connector.catalog.functions.Function