Interface SimpleFunction
- All Superinterfaces:
BoundFunction,Function,Serializable,UnboundFunction
A function that does not require binding to input types.
This interface is designed for functions that have no overloads and do not need custom binding
logic. Implementations can directly provide function parameters and execution logic without
implementing the bind method.
The default bind method simply returns this, as the function
is already considered bound.
- Since:
- 4.2.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault BoundFunctionbind(StructType inputType) Bind this function to an input type.Methods inherited from interface org.apache.spark.sql.connector.catalog.functions.BoundFunction
canonicalName, inputTypes, isDeterministic, isResultNullable, resultTypeMethods inherited from interface org.apache.spark.sql.connector.catalog.functions.UnboundFunction
description
-
Method Details
-
bind
Description copied from interface:UnboundFunctionBind this function to an input type.If the input type is not supported, implementations must throw
UnsupportedOperationException.For example, a "length" function that only supports a single string argument should throw UnsupportedOperationException if the struct has more than one field or if that field is not a string, and it may optionally throw if the field is nullable.
- Specified by:
bindin interfaceUnboundFunction- Parameters:
inputType- a struct type for inputs that will be passed to the bound function- Returns:
- a function that can process rows with the given input type
-