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
FieldsFields inherited from class org.apache.calcite.sql.SqlOperator
kind, MDX_PRECEDENCE, NL -
Constructor Summary
ConstructorsModifierConstructorDescriptionSqlUserDefinedFunction(SqlIdentifier opName, SqlKind kind, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, @Nullable SqlOperandMetadata operandMetadata, Function function) Creates aSqlUserDefinedFunction.protectedSqlUserDefinedFunction(SqlIdentifier opName, SqlKind kind, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, @Nullable SqlOperandMetadata operandMetadata, Function function, SqlFunctionCategory category, SqlSyntax syntax) Constructor used internally and by derived classes.SqlUserDefinedFunction(SqlIdentifier opName, SqlKind kind, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, @Nullable SqlOperandMetadata operandMetadata, Function function, SqlSyntax syntax) Creates aSqlUserDefinedFunctionwith sql syntax.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 SqlOperandMetadataUseSqlOperandMetadata.paramNames()on the result ofSqlOperator.getOperandTypeChecker().Returns the syntactic type of this operator, never null.Methods inherited from class org.apache.calcite.sql.SqlFunction
deriveType, getFunctionType, getNameAsId, getParamTypes, getSqlIdentifier, 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, getMonotonicity, getName, getOperandCountRange, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, getSqlCallFactory, 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
-
syntax
-
-
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
public SqlUserDefinedFunction(SqlIdentifier opName, SqlKind kind, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, @Nullable SqlOperandMetadata operandMetadata, Function function, SqlSyntax syntax) Creates aSqlUserDefinedFunctionwith sql syntax. -
SqlUserDefinedFunction
protected SqlUserDefinedFunction(SqlIdentifier opName, SqlKind kind, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, @Nullable SqlOperandMetadata operandMetadata, Function function, SqlFunctionCategory category, SqlSyntax syntax) Constructor used internally and by derived classes.
-
-
Method Details
-
getOperandTypeChecker
- Overrides:
getOperandTypeCheckerin classSqlOperator
-
getSyntax
Description copied from class:SqlOperatorReturns the syntactic type of this operator, never null.- Overrides:
getSyntaxin classSqlFunction
-
getFunction
Returns function that implements given operator call.- Returns:
- function that implements given operator call
-
getParamNames
Description copied from class:SqlFunctionUseSqlOperandMetadata.paramNames()on the result ofSqlOperator.getOperandTypeChecker().- Overrides:
getParamNamesin classSqlFunction
-