@Internal public class BuiltInSqlFunction extends org.apache.calcite.sql.SqlFunction implements BuiltInSqlOperator
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.
Modifier and Type | Class and Description |
---|---|
static class |
BuiltInSqlFunction.Builder
Builder for fluent definition of built-in functions.
|
Modifier | Constructor and Description |
---|---|
protected |
BuiltInSqlFunction(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) |
protected |
BuiltInSqlFunction(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) |
Modifier and Type | Method and Description |
---|---|
org.apache.calcite.sql.validate.SqlMonotonicity |
getMonotonicity(org.apache.calcite.sql.SqlOperatorBinding call) |
String |
getQualifiedName() |
Optional<Integer> |
getVersion() |
boolean |
isDeterministic() |
boolean |
isInternal() |
static BuiltInSqlFunction.Builder |
newBuilder()
Builder for configuring and creating instances of
BuiltInSqlFunction . |
deriveType, getFunctionType, getNameAsId, getParamNames, getParamTypes, getSqlIdentifier, getSyntax, isQuantifierAllowed, unparse, validateCall, validateQuantifier
acceptCall, acceptCall, adjustType, allowsFraming, argumentMustBeScalar, checkOperandCount, checkOperandTypes, constructArgNameList, constructArgTypeList, constructOperandList, createCall, createCall, createCall, createCall, createCall, createCall, createCall, 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
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
extractNameFromQualifiedName, toQualifiedName, unwrapIsInternal, unwrapVersion
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)
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)
public static BuiltInSqlFunction.Builder newBuilder()
BuiltInSqlFunction
.public final Optional<Integer> getVersion()
getVersion
in interface BuiltInSqlOperator
BuiltInFunctionDefinition.getVersion()
public String getQualifiedName()
getQualifiedName
in interface BuiltInSqlOperator
BuiltInFunctionDefinition.getQualifiedName()
public boolean isDeterministic()
isDeterministic
in class org.apache.calcite.sql.SqlOperator
public final boolean isInternal()
isInternal
in interface BuiltInSqlOperator
BuiltInFunctionDefinition.isInternal()
public org.apache.calcite.sql.validate.SqlMonotonicity getMonotonicity(org.apache.calcite.sql.SqlOperatorBinding call)
getMonotonicity
in class org.apache.calcite.sql.SqlOperator
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.