Class TypeInference.Builder
- java.lang.Object
-
- org.apache.flink.table.types.inference.TypeInference.Builder
-
- Enclosing class:
- TypeInference
@PublicEvolving public static class TypeInference.Builder extends Object
Builder for configuring and creating instances ofTypeInference
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TypeInference.Builder
accumulatorTypeStrategy(TypeStrategy accumulatorTypeStrategy)
Sets the strategy for inferring the intermediate accumulator data type of an aggregate function call.TypeInference
build()
TypeInference.Builder
inputTypeStrategy(InputTypeStrategy inputTypeStrategy)
Sets the strategy for inferring and validating input arguments in a function call.TypeInference.Builder
namedArguments(String... argumentNames)
Deprecated.UsestaticArguments(StaticArgument...)
instead.TypeInference.Builder
namedArguments(List<String> argumentNames)
Deprecated.UsestaticArguments(List)
instead.TypeInference.Builder
optionalArguments(List<Boolean> optionalArguments)
Deprecated.UsestaticArguments(List)
instead.TypeInference.Builder
outputTypeStrategy(TypeStrategy outputTypeStrategy)
Sets the strategy for inferring the final output data type of a function call.TypeInference.Builder
stateTypeStrategies(LinkedHashMap<String,StateTypeStrategy> stateTypeStrategies)
Sets a map of state names toStateTypeStrategy
s for inferring a function call's intermediate result data types (i.e. state entries).TypeInference.Builder
staticArguments(List<StaticArgument> staticArgument)
Sets a list of arguments in a static signature that is not overloaded and does not support varargs.TypeInference.Builder
staticArguments(StaticArgument... staticArguments)
Sets a list of arguments in a static signature that is not overloaded and does not support varargs.TypeInference.Builder
typedArguments(List<DataType> argumentTypes)
Deprecated.UsestaticArguments(List)
instead.TypeInference.Builder
typedArguments(DataType... argumentTypes)
Deprecated.UsestaticArguments(StaticArgument...)
instead.
-
-
-
Method Detail
-
staticArguments
public TypeInference.Builder staticArguments(StaticArgument... staticArguments)
Sets a list of arguments in a static signature that is not overloaded and does not support varargs.Static arguments are a special case of an input type strategy and takes precedence. A signature can take tables, models, or scalar values. It allows optional and/or named argument like
f(myArg => 12)
.
-
staticArguments
public TypeInference.Builder staticArguments(List<StaticArgument> staticArgument)
Sets a list of arguments in a static signature that is not overloaded and does not support varargs.Static arguments are a special case of an input type strategy and takes precedence. A signature can take tables, models, or scalar values. It allows optional and/or named argument like
f(myArg => 12)
.
-
inputTypeStrategy
public TypeInference.Builder inputTypeStrategy(InputTypeStrategy inputTypeStrategy)
Sets the strategy for inferring and validating input arguments in a function call.A
InputTypeStrategies.WILDCARD
strategy function is assumed by default.
-
accumulatorTypeStrategy
public TypeInference.Builder accumulatorTypeStrategy(TypeStrategy accumulatorTypeStrategy)
Sets the strategy for inferring the intermediate accumulator data type of an aggregate function call.
-
stateTypeStrategies
public TypeInference.Builder stateTypeStrategies(LinkedHashMap<String,StateTypeStrategy> stateTypeStrategies)
Sets a map of state names toStateTypeStrategy
s for inferring a function call's intermediate result data types (i.e. state entries). For aggregate functions, only one entry is allowed which defines the accumulator's data type.
-
outputTypeStrategy
public TypeInference.Builder outputTypeStrategy(TypeStrategy outputTypeStrategy)
Sets the strategy for inferring the final output data type of a function call.Required.
-
build
public TypeInference build()
-
namedArguments
@Deprecated public TypeInference.Builder namedArguments(List<String> argumentNames)
Deprecated.UsestaticArguments(List)
instead.Sets the list of argument names for specifying a fixed, not overloaded, not vararg input signature explicitly.This information is useful for SQL's concept of named arguments using the assignment operator (e.g.
FUNC(max => 42)
). The names are used for reordering the call's arguments to the formal argument order of the function.
-
namedArguments
@Deprecated public TypeInference.Builder namedArguments(String... argumentNames)
Deprecated.UsestaticArguments(StaticArgument...)
instead.- See Also:
namedArguments(List)
-
optionalArguments
@Deprecated public TypeInference.Builder optionalArguments(List<Boolean> optionalArguments)
Deprecated.UsestaticArguments(List)
instead.Sets the list of argument optionals for specifying optional arguments in the input signature explicitly.This information is useful for SQL's concept of named arguments using the assignment operator. The optionals are used to determine whether an argument is optional or required in the function call.
-
typedArguments
@Deprecated public TypeInference.Builder typedArguments(List<DataType> argumentTypes)
Deprecated.UsestaticArguments(List)
instead.Sets the list of argument types for specifying a fixed, not overloaded, not vararg input signature explicitly.This information is useful for optional arguments with default value. In particular, the number of arguments that need to be filled with a default value and their types is
-
typedArguments
@Deprecated public TypeInference.Builder typedArguments(DataType... argumentTypes)
Deprecated.UsestaticArguments(StaticArgument...)
instead.- See Also:
typedArguments(List)
-
-