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,
List<RelDataType> paramTypes,
TableMacro tableMacro) |
| Modifier and Type | Method and Description |
|---|---|
private static Object |
coerce(Object o,
RelDataType type) |
static List<Object> |
convertArguments(RelDataTypeFactory typeFactory,
List<SqlNode> operandList,
Function function,
SqlIdentifier opName,
boolean failOnNonLiteral)
Converts arguments from
SqlNode to
java object format. |
List<String> |
getParamNames()
Returns a list of parameter names.
|
TranslatableTable |
getTable(RelDataTypeFactory typeFactory,
List<SqlNode> operandList)
Returns the table in this UDF, or null if there is no table.
|
private static Object |
getValue(SqlNode right) |
deriveType, getFunctionType, getNameAsId, getParamTypes, getSqlIdentifier, getSyntax, isQuantifierAllowed, unparse, validateCall, validateQuantifieracceptCall, 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, validRexOperandsprivate final TableMacro tableMacro
public SqlUserDefinedTableMacro(SqlIdentifier opName, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker, List<RelDataType> paramTypes, TableMacro tableMacro)
public List<String> getParamNames()
SqlFunctionThe default implementation returns [arg0, arg1, ..., argN].
getParamNames in class SqlFunctionpublic TranslatableTable getTable(RelDataTypeFactory typeFactory, List<SqlNode> operandList)
public static List<Object> convertArguments(RelDataTypeFactory typeFactory, 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 Object getValue(SqlNode right) throws SqlUserDefinedTableMacro.NonLiteralException
private static Object coerce(Object o, RelDataType type)
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.