Package org.apache.calcite.sql.validate
Class SqlUserDefinedTableFunction
- java.lang.Object
-
- org.apache.calcite.sql.SqlOperator
-
- org.apache.calcite.sql.SqlFunction
-
- org.apache.calcite.sql.validate.SqlUserDefinedFunction
-
- org.apache.calcite.sql.validate.SqlUserDefinedTableFunction
-
public class SqlUserDefinedTableFunction extends SqlUserDefinedFunction
User-defined table 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.validate.SqlUserDefinedFunction
function
-
Fields inherited from class org.apache.calcite.sql.SqlOperator
kind, MDX_PRECEDENCE, NL
-
-
Constructor Summary
Constructors Constructor Description SqlUserDefinedTableFunction(SqlIdentifier opName, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker, java.util.List<RelDataType> paramTypes, TableFunction function)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.reflect.Type
getElementType(RelDataTypeFactory typeFactory, java.util.List<SqlNode> operandList)
Returns the row type of the table yielded by this function when applied to given arguments.TableFunction
getFunction()
Returns function that implements given operator call.RelDataType
getRowType(RelDataTypeFactory typeFactory, java.util.List<SqlNode> operandList)
Returns the record type of the table yielded by this function when applied to given arguments.-
Methods inherited from class org.apache.calcite.sql.validate.SqlUserDefinedFunction
getParamNames
-
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, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getMonotonicity, getName, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, hashCode, inferReturnType, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isGroup, isGroupAuxiliary, isName, leftPrec, preValidateCall, requiresDecimalExpansion, requiresOrder, requiresOver, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateOperands, validRexOperands
-
-
-
-
Constructor Detail
-
SqlUserDefinedTableFunction
public SqlUserDefinedTableFunction(SqlIdentifier opName, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker, java.util.List<RelDataType> paramTypes, TableFunction function)
-
-
Method Detail
-
getFunction
public TableFunction getFunction()
Returns function that implements given operator call.- Overrides:
getFunction
in classSqlUserDefinedFunction
- Returns:
- function that implements given operator call
-
getRowType
public RelDataType getRowType(RelDataTypeFactory typeFactory, java.util.List<SqlNode> operandList)
Returns the record type of the table yielded by this function when applied to given arguments. Only literal arguments are passed, non-literal are replaced with default values (null, 0, false, etc).- Parameters:
typeFactory
- Type factoryoperandList
- arguments of a function call (only literal arguments are passed, nulls for non-literal ones)- Returns:
- row type of the table
-
getElementType
public java.lang.reflect.Type getElementType(RelDataTypeFactory typeFactory, java.util.List<SqlNode> operandList)
Returns the row type of the table yielded by this function when applied to given arguments. Only literal arguments are passed, non-literal are replaced with default values (null, 0, false, etc).- Parameters:
operandList
- arguments of a function call (only literal arguments are passed, nulls for non-literal ones)- Returns:
- element type of the table (e.g.
Object[].class
)
-
-