Class TypeInference.Builder
- Enclosing class:
- TypeInference
TypeInference.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccumulatorTypeStrategy(TypeStrategy accumulatorTypeStrategy) Sets the strategy for inferring the intermediate accumulator data type of an aggregate function call.build()inputTypeStrategy(InputTypeStrategy inputTypeStrategy) Sets the strategy for inferring and validating input arguments in a function call.namedArguments(String... argumentNames) Deprecated.namedArguments(List<String> argumentNames) Deprecated.UsestaticArguments(List)instead.optionalArguments(List<Boolean> optionalArguments) Deprecated.UsestaticArguments(List)instead.outputTypeStrategy(TypeStrategy outputTypeStrategy) Sets the strategy for inferring the final output data type of a function call.stateTypeStrategies(LinkedHashMap<String, StateTypeStrategy> stateTypeStrategies) Sets a map of state names toStateTypeStrategys for inferring a function call's intermediate result data types (i.e. state entries).staticArguments(List<StaticArgument> staticArgument) Sets a list of arguments in a static signature that is not overloaded and does not support varargs.staticArguments(StaticArgument... staticArguments) Sets a list of arguments in a static signature that is not overloaded and does not support varargs.typedArguments(List<DataType> argumentTypes) Deprecated.UsestaticArguments(List)instead.typedArguments(DataType... argumentTypes) Deprecated.UsestaticArguments(StaticArgument...)instead.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
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
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
Sets the strategy for inferring and validating input arguments in a function call.A
InputTypeStrategies.WILDCARDstrategy function is assumed by default. -
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 toStateTypeStrategys 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
Sets the strategy for inferring the final output data type of a function call.Required.
-
build
-
namedArguments
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.UsestaticArguments(StaticArgument...)instead.- See Also:
-
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.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.UsestaticArguments(StaticArgument...)instead.- See Also:
-
staticArguments(StaticArgument...)instead.