Package org.apache.calcite.sql.fun
Class SqlMapValueConstructor
- java.lang.Object
-
- org.apache.calcite.sql.SqlOperator
-
- org.apache.calcite.sql.SqlSpecialOperator
-
- org.apache.calcite.sql.fun.SqlMultisetValueConstructor
-
- org.apache.calcite.sql.fun.SqlMapValueConstructor
-
public class SqlMapValueConstructor extends SqlMultisetValueConstructor
Definition of the MAP constructor,MAP [<key>, <value>, ...]
.This is an extension to standard SQL.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.calcite.sql.SqlSpecialOperator
SqlSpecialOperator.ReduceResult, SqlSpecialOperator.TokenSequence
-
-
Field Summary
-
Fields inherited from class org.apache.calcite.sql.SqlOperator
kind, MDX_PRECEDENCE, NL
-
-
Constructor Summary
Constructors Constructor Description SqlMapValueConstructor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkOperandTypes(SqlCallBinding callBinding, boolean throwOnFailure)
Checks that the operand values in aSqlCall
to this operator are valid.private Pair<RelDataType,RelDataType>
getComponentTypes(RelDataTypeFactory typeFactory, java.util.List<RelDataType> argTypes)
RelDataType
inferReturnType(SqlOperatorBinding opBinding)
Infers the return type of an invocation of this operator; only called after the number and types of operands have already been validated.-
Methods inherited from class org.apache.calcite.sql.fun.SqlMultisetValueConstructor
getComponentType, unparse
-
Methods inherited from class org.apache.calcite.sql.SqlSpecialOperator
getSyntax, reduceExpr
-
Methods inherited from class org.apache.calcite.sql.SqlOperator
acceptCall, acceptCall, adjustType, allowsFraming, argumentMustBeScalar, checkOperandCount, constructArgNameList, constructArgTypeList, constructOperandList, createCall, createCall, createCall, createCall, deriveType, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getMonotonicity, getName, getNameAsId, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, hashCode, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isGroup, isGroupAuxiliary, isName, leftPrec, preValidateCall, requiresDecimalExpansion, requiresOrder, requiresOver, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateCall, validateOperands, validRexOperands
-
-
-
-
Method Detail
-
inferReturnType
public RelDataType inferReturnType(SqlOperatorBinding opBinding)
Description copied from class:SqlOperator
Infers the return type of an invocation of this operator; only called after the number and types of operands have already been validated. Subclasses must either override this method or supply an instance ofSqlReturnTypeInference
to the constructor.- Overrides:
inferReturnType
in classSqlMultisetValueConstructor
- Parameters:
opBinding
- description of invocation (not necessarily aSqlCall
)- Returns:
- inferred return type
-
checkOperandTypes
public boolean checkOperandTypes(SqlCallBinding callBinding, boolean throwOnFailure)
Description copied from class:SqlOperator
Checks that the operand values in aSqlCall
to this operator are valid. Subclasses must either override this method or supply an instance ofSqlOperandTypeChecker
to the constructor.- Overrides:
checkOperandTypes
in classSqlMultisetValueConstructor
- Parameters:
callBinding
- description of callthrowOnFailure
- whether to throw an exception if check fails (otherwise returns false in that case)- Returns:
- whether check succeeded
-
getComponentTypes
private Pair<RelDataType,RelDataType> getComponentTypes(RelDataTypeFactory typeFactory, java.util.List<RelDataType> argTypes)
-
-