@Internal public final class ArrayComparableElementArgumentTypeStrategy extends Object implements ArgumentTypeStrategy
ArgumentTypeStrategy that checks if the input argument is an ARRAY type and check
whether its' elements are comparable.
It requires one argument.
For the rules which types are comparable with which types see areComparable(LogicalType, LogicalType).
| 构造器和说明 |
|---|
ArrayComparableElementArgumentTypeStrategy(StructuredType.StructuredComparison requiredComparison) |
| 限定符和类型 | 方法和说明 |
|---|---|
Signature.Argument |
getExpectedArgument(FunctionDefinition functionDefinition,
int argumentPos)
Returns a summary of the function's expected argument at
argumentPos. |
Optional<DataType> |
inferArgumentType(CallContext callContext,
int argumentPos,
boolean throwOnFailure)
Main logic for inferring and validating an argument.
|
public ArrayComparableElementArgumentTypeStrategy(StructuredType.StructuredComparison requiredComparison)
public Optional<DataType> inferArgumentType(CallContext callContext, int argumentPos, boolean throwOnFailure)
ArgumentTypeStrategyCallContext.getArgumentDataTypes()
at argumentPos, a casting operation can be inserted. An empty result means that the
given input type could not be inferred.inferArgumentType 在接口中 ArgumentTypeStrategycallContext - provides details about the function callargumentPos - argument index in the CallContextthrowOnFailure - whether this function is allowed to throw an ValidationException with a meaningful exception in case the inference is not successful
or if this function should simply return an empty result.CallContext.newValidationError(String, Object...)public Signature.Argument getExpectedArgument(FunctionDefinition functionDefinition, int argumentPos)
ArgumentTypeStrategyargumentPos.getExpectedArgument 在接口中 ArgumentTypeStrategyfunctionDefinition - the function definition that defines the function currently being
called.argumentPos - the position within the function call for which the signature should be
retrievedCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.