Class BuiltInSqlFunction
java.lang.Object
org.apache.calcite.sql.SqlOperator
org.apache.calcite.sql.SqlFunction
org.apache.flink.table.planner.functions.sql.BuiltInSqlFunction
- All Implemented Interfaces:
BuiltInSqlOperator
- Direct Known Subclasses:
MatchRowTimeFunction,SqlTryCastFunction
@Internal
public class BuiltInSqlFunction
extends org.apache.calcite.sql.SqlFunction
implements BuiltInSqlOperator
SQL version of
BuiltInFunctionDefinition in cases where BridgingSqlFunction does
not apply. This is the case when the operator has a special parsing syntax or uses other
Calcite-specific features that are not exposed via BuiltInFunctionDefinition yet.
Note: Try to keep usages of this class to a minimum and use Flink's BuiltInFunctionDefinition stack instead.
For simple functions, use the provided builder. Otherwise, this class can also be extended.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for fluent definition of built-in functions. -
Field Summary
Fields inherited from class org.apache.calcite.sql.SqlOperator
kind, MDX_PRECEDENCE, NL -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBuiltInSqlFunction(String name, int version, org.apache.calcite.sql.SqlKind kind, org.apache.calcite.sql.type.SqlReturnTypeInference returnTypeInference, org.apache.calcite.sql.type.SqlOperandTypeInference operandTypeInference, org.apache.calcite.sql.type.SqlOperandTypeChecker operandTypeChecker, org.apache.calcite.sql.SqlFunctionCategory category, boolean isDeterministic, boolean isInternal, Function<org.apache.calcite.sql.SqlOperatorBinding, org.apache.calcite.sql.validate.SqlMonotonicity> monotonicity) protectedBuiltInSqlFunction(String name, org.apache.calcite.sql.SqlKind kind, org.apache.calcite.sql.type.SqlReturnTypeInference returnTypeInference, org.apache.calcite.sql.type.SqlOperandTypeInference operandTypeInference, org.apache.calcite.sql.type.SqlOperandTypeChecker operandTypeChecker, org.apache.calcite.sql.SqlFunctionCategory category) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.calcite.sql.validate.SqlMonotonicitygetMonotonicity(org.apache.calcite.sql.SqlOperatorBinding call) booleanfinal booleanstatic BuiltInSqlFunction.BuilderBuilder for configuring and creating instances ofBuiltInSqlFunction.Methods inherited from class org.apache.calcite.sql.SqlFunction
deriveType, getFunctionType, getNameAsId, getParamNames, getParamTypes, getSqlIdentifier, getSyntax, isQuantifierAllowed, unparse, validateCall, validateQuantifierMethods inherited from class org.apache.calcite.sql.SqlOperator
acceptCall, acceptCall, adjustType, allowsFraming, argumentMustBeScalar, checkOperandCount, checkOperandTypes, constructArgNameList, constructArgTypeList, constructOperandList, createCall, createCall, createCall, createCall, createCall, createCall, createCall, deriveOperandType, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getName, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, getStrongPolicyInference, hashCode, inferReturnType, inferReturnType, isAggregator, isDynamicFunction, isGroup, isGroupAuxiliary, isName, isSymmetrical, leftPrec, not, preValidateCall, requiresDecimalExpansion, requiresOrder, requiresOver, reverse, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateOperands, validRexOperands
-
Constructor Details
-
BuiltInSqlFunction
protected BuiltInSqlFunction(String name, int version, org.apache.calcite.sql.SqlKind kind, @Nullable org.apache.calcite.sql.type.SqlReturnTypeInference returnTypeInference, @Nullable org.apache.calcite.sql.type.SqlOperandTypeInference operandTypeInference, @Nullable org.apache.calcite.sql.type.SqlOperandTypeChecker operandTypeChecker, org.apache.calcite.sql.SqlFunctionCategory category, boolean isDeterministic, boolean isInternal, Function<org.apache.calcite.sql.SqlOperatorBinding, org.apache.calcite.sql.validate.SqlMonotonicity> monotonicity) -
BuiltInSqlFunction
protected BuiltInSqlFunction(String name, org.apache.calcite.sql.SqlKind kind, org.apache.calcite.sql.type.SqlReturnTypeInference returnTypeInference, org.apache.calcite.sql.type.SqlOperandTypeInference operandTypeInference, @Nullable org.apache.calcite.sql.type.SqlOperandTypeChecker operandTypeChecker, org.apache.calcite.sql.SqlFunctionCategory category)
-
-
Method Details
-
newBuilder
Builder for configuring and creating instances ofBuiltInSqlFunction. -
getVersion
- Specified by:
getVersionin interfaceBuiltInSqlOperator- See Also:
-
BuiltInFunctionDefinition.getVersion()
-
getQualifiedName
- Specified by:
getQualifiedNamein interfaceBuiltInSqlOperator- See Also:
-
BuiltInFunctionDefinition.getQualifiedName()
-
isDeterministic
public boolean isDeterministic()- Overrides:
isDeterministicin classorg.apache.calcite.sql.SqlOperator
-
isInternal
public final boolean isInternal()- Specified by:
isInternalin interfaceBuiltInSqlOperator- See Also:
-
BuiltInFunctionDefinition.isInternal()
-
getMonotonicity
public org.apache.calcite.sql.validate.SqlMonotonicity getMonotonicity(org.apache.calcite.sql.SqlOperatorBinding call) - Overrides:
getMonotonicityin classorg.apache.calcite.sql.SqlOperator
-