Package org.apache.flink.cdc.common.udf
Interface UserDefinedFunction
-
- All Known Implementing Classes:
AddOneFunctionClass,BinaryTypeReturningClass,CharTypeReturningClass,ConfigurableFunctionClass,DecimalTypeNonNullReturningClass,DecimalTypeReturningClass,FormatFunctionClass,LifecycleFunctionClass,LocalZonedTimestampTypeReturningClass,OpenAIChatModel,OpenAIEmbeddingModel,PythonUdf,SkewedThrottlerFunctionClass,ThrottlerFunctionClass,TimestampTypeReturningClass,TypeHintFunctionClass,TypeOfFunctionClass,VarBinaryTypeReturningClass,VarCharTypeReturningClass
@PublicEvolving public interface UserDefinedFunction
Base interface for creating a UDF in transform projection and filtering expressions. You should define at least oneevalmethod.When
transform.async-execution.enabledis enabled, the same UDF instance may be invoked concurrently. Implementations used in asynchronous transforms must therefore be thread-safe.
-
-
Method Summary
All Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description default voidclose()This will be invoked before a UDF got destroyed.default DataTypegetReturnType()Deprecated.UsegetReturnType(UserDefinedFunctionContext)instead.default DataTypegetReturnType(UserDefinedFunctionContext context)Returns the return type of this UDF, given the per-UDF YAML options.default voidopen()Deprecated.Useopen(UserDefinedFunctionContext)instead.default voidopen(UserDefinedFunctionContext context)This will be invoked every time when a UDF got created.
-
-
-
Method Detail
-
getReturnType
@Deprecated default DataType getReturnType()
Deprecated.UsegetReturnType(UserDefinedFunctionContext)instead.Returns the return type of this UDF when it cannot be derived from per-UDF options.
-
getReturnType
default DataType getReturnType(UserDefinedFunctionContext context)
Returns the return type of this UDF, given the per-UDF YAML options.
-
open
@Deprecated default void open() throws Exception
Deprecated.Useopen(UserDefinedFunctionContext)instead.This will be invoked every time when a UDF got created.- Throws:
Exception
-
open
default void open(UserDefinedFunctionContext context) throws Exception
This will be invoked every time when a UDF got created.- Throws:
Exception
-
-