Package org.apache.calcite.sql.validate
Class SqlUserDefinedFunction
java.lang.Object
org.apache.calcite.sql.SqlOperator
org.apache.calcite.sql.SqlFunction
org.apache.calcite.sql.validate.SqlUserDefinedFunction
- Direct Known Subclasses:
PigUserDefinedFunction
,SqlUserDefinedTableFunction
User-defined scalar function.
Created by the validator, after resolving a function call to a function defined in a Calcite schema.
-
Field Summary
Fields inherited from class org.apache.calcite.sql.SqlOperator
kind, MDX_PRECEDENCE, NL
-
Constructor Summary
ModifierConstructorDescriptionSqlUserDefinedFunction
(SqlIdentifier opName, SqlKind kind, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, @Nullable SqlOperandMetadata operandMetadata, Function function) Creates aSqlUserDefinedFunction
.protected
SqlUserDefinedFunction
(SqlIdentifier opName, SqlKind kind, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, @Nullable SqlOperandMetadata operandMetadata, Function function, SqlFunctionCategory category) Constructor used internally and by derived classes.SqlUserDefinedFunction
(SqlIdentifier opName, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, @Nullable SqlOperandTypeChecker operandTypeChecker, List<RelDataType> paramTypes, Function function) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionReturns function that implements given operator call.@Nullable SqlOperandMetadata
UseSqlOperandMetadata.paramNames()
on the result ofSqlOperator.getOperandTypeChecker()
.Methods inherited from class org.apache.calcite.sql.SqlFunction
deriveType, getFunctionType, getNameAsId, getParamTypes, getSqlIdentifier, getSyntax, isQuantifierAllowed, unparse, validateCall, validateQuantifier
Methods 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, getMonotonicity, getName, getOperandCountRange, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, getStrongPolicyInference, hashCode, inferReturnType, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isGroup, isGroupAuxiliary, isName, isSymmetrical, leftPrec, not, preValidateCall, requiresDecimalExpansion, requiresOrder, requiresOver, reverse, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateOperands, validRexOperands
-
Field Details
-
function
-
-
Constructor Details
-
SqlUserDefinedFunction
@Deprecated public SqlUserDefinedFunction(SqlIdentifier opName, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, @Nullable SqlOperandTypeChecker operandTypeChecker, List<RelDataType> paramTypes, Function function) Deprecated. -
SqlUserDefinedFunction
public SqlUserDefinedFunction(SqlIdentifier opName, SqlKind kind, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, @Nullable SqlOperandMetadata operandMetadata, Function function) Creates aSqlUserDefinedFunction
. -
SqlUserDefinedFunction
protected SqlUserDefinedFunction(SqlIdentifier opName, SqlKind kind, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, @Nullable SqlOperandMetadata operandMetadata, Function function, SqlFunctionCategory category) Constructor used internally and by derived classes.
-
-
Method Details
-
getOperandTypeChecker
- Overrides:
getOperandTypeChecker
in classSqlOperator
-
getFunction
Returns function that implements given operator call.- Returns:
- function that implements given operator call
-
getParamNames
Description copied from class:SqlFunction
UseSqlOperandMetadata.paramNames()
on the result ofSqlOperator.getOperandTypeChecker()
.- Overrides:
getParamNames
in classSqlFunction
-