public class SqlUserDefinedTableMacro extends SqlFunction
Created by the validator, after resolving a function call to a function defined in a Calcite schema.
Modifier and Type | Class and Description |
---|---|
private static class |
SqlUserDefinedTableMacro.NonLiteralException
Thrown when a non-literal occurs in an argument to a user-defined
table macro.
|
Modifier and Type | Field and Description |
---|---|
private TableMacro |
tableMacro |
kind, MDX_PRECEDENCE, NL
Constructor and Description |
---|
SqlUserDefinedTableMacro(SqlIdentifier opName,
SqlReturnTypeInference returnTypeInference,
SqlOperandTypeInference operandTypeInference,
SqlOperandTypeChecker operandTypeChecker,
java.util.List<RelDataType> paramTypes,
TableMacro tableMacro) |
Modifier and Type | Method and Description |
---|---|
private static java.lang.Object |
coerce(java.lang.Object o,
RelDataType type) |
static java.util.List<java.lang.Object> |
convertArguments(RelDataTypeFactory typeFactory,
java.util.List<SqlNode> operandList,
Function function,
SqlIdentifier opName,
boolean failOnNonLiteral)
Converts arguments from
SqlNode to
java object format. |
java.util.List<java.lang.String> |
getParamNames()
Returns a list of parameter names.
|
TranslatableTable |
getTable(RelDataTypeFactory typeFactory,
java.util.List<SqlNode> operandList)
Returns the table in this UDF, or null if there is no table.
|
private static java.lang.Object |
getValue(SqlNode right) |
deriveType, getFunctionType, getNameAsId, getParamTypes, getSqlIdentifier, getSyntax, isQuantifierAllowed, unparse, validateCall, validateQuantifier
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
private final TableMacro tableMacro
public SqlUserDefinedTableMacro(SqlIdentifier opName, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker, java.util.List<RelDataType> paramTypes, TableMacro tableMacro)
public java.util.List<java.lang.String> getParamNames()
SqlFunction
The default implementation returns [arg0, arg1, ..., argN]
.
getParamNames
in class SqlFunction
public TranslatableTable getTable(RelDataTypeFactory typeFactory, java.util.List<SqlNode> operandList)
public static java.util.List<java.lang.Object> convertArguments(RelDataTypeFactory typeFactory, java.util.List<SqlNode> operandList, Function function, SqlIdentifier opName, boolean failOnNonLiteral)
SqlNode
to
java object format.typeFactory
- type factory used to convert the argumentsoperandList
- input argumentsfunction
- target function to get parameter types fromopName
- name of the operator to use in error messagefailOnNonLiteral
- true when conversion should fail on non-literalprivate static java.lang.Object getValue(SqlNode right) throws SqlUserDefinedTableMacro.NonLiteralException
private static java.lang.Object coerce(java.lang.Object o, RelDataType type)
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.