Package org.apache.flink.table.functions
Class BuiltInFunctionDefinition.Builder
java.lang.Object
org.apache.flink.table.functions.BuiltInFunctionDefinition.Builder
- Enclosing class:
- BuiltInFunctionDefinition
Builder for fluent definition of built-in functions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()callSyntax(String name, SqlCallSyntax syntax) Overwrites the syntax used for unparsing a function into a SQL string.callSyntax(SqlCallSyntax syntax) Overwrites the syntax used for unparsing a function into a SQL string.inputTypeStrategy(InputTypeStrategy inputTypeStrategy) internal()Specifies that thisBuiltInFunctionDefinitionis meant for internal purposes only and should not be exposed when listing functions.kind(FunctionKind kind) Specifies a name that uniquely identifies a built-in function.namedArguments(String... argumentNames) Deprecated.outputTypeStrategy(TypeStrategy outputTypeStrategy) runtimeClass(String runtimeClass) Specifies the runtime class implementing thisBuiltInFunctionDefinition.Specifies that thisBuiltInFunctionDefinitionwill be mapped to a Calcite function.Specifies that thisBuiltInFunctionDefinitionis implemented during code generation.Overwrites the name that is used for unparsing a function into a SQL string.staticArguments(StaticArgument... staticArguments) typedArguments(DataType... argumentTypes) Deprecated.UsestaticArguments(StaticArgument...)instead.version(int version) Specifies a version that will be persisted in the plan together with the function's name.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
name
Specifies a name that uniquely identifies a built-in function.Please adhere to the following naming convention:
- Use upper case and separate words with underscore.
- Depending on the importance of the function, the underscore is sometimes omitted
e.g. for
IFNULLorTYPEOFbut not forTO_TIMESTAMP_LTZ. - Internal functions must start with $ and include a version starting from 1. The
following format is enforced:
$NAME$VERSIONsuch as$REPLICATE_ROWS$1.
-
version
Specifies a version that will be persisted in the plan together with the function's name. The default version is 1 for non-internal functions.Note: Internal functions don't need to specify a version as we enforce a unique name that includes a version (see
name(String)). -
kind
-
staticArguments
-
namedArguments
Deprecated.UsestaticArguments(StaticArgument...)instead. -
typedArguments
Deprecated.UsestaticArguments(StaticArgument...)instead. -
inputTypeStrategy
-
outputTypeStrategy
-
notDeterministic
-
runtimeProvided
Specifies that thisBuiltInFunctionDefinitionis implemented during code generation. -
runtimeClass
Specifies the runtime class implementing thisBuiltInFunctionDefinition. -
runtimeDeferred
Specifies that thisBuiltInFunctionDefinitionwill be mapped to a Calcite function. -
internal
Specifies that thisBuiltInFunctionDefinitionis meant for internal purposes only and should not be exposed when listing functions. -
callSyntax
Overwrites the syntax used for unparsing a function into a SQL string. If not specified,SqlCallSyntax.FUNCTIONis used. -
callSyntax
Overwrites the syntax used for unparsing a function into a SQL string. If not specified,SqlCallSyntax.FUNCTIONis used. This method overwrites the name as well. If the name is not providedname(String)is passed to theSqlCallSyntax. -
sqlName
Overwrites the name that is used for unparsing a function into a SQL string. If not specified,name(String)is used. -
build
-
staticArguments(StaticArgument...)instead.