Package org.apache.calcite.sql.fun
Class SqlMultisetQueryConstructor
java.lang.Object
org.apache.calcite.sql.SqlOperator
org.apache.calcite.sql.SqlSpecialOperator
org.apache.calcite.sql.fun.SqlMultisetQueryConstructor
- Direct Known Subclasses:
SqlArrayQueryConstructor,SqlMapQueryConstructor
Definition of the SQL:2003 standard MULTISET query constructor,
MULTISET (<query>).- See Also:
-
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
ConstructorsModifierConstructorDescriptionprotectedSqlMultisetQueryConstructor(String name, SqlKind kind, SqlTypeTransform typeTransform) -
Method Summary
Modifier and TypeMethodDescriptionbooleanargumentMustBeScalar(int ordinal) Returns whether theordinalth argument to this operator must be scalar (as opposed to a query).booleancheckOperandTypes(SqlCallBinding callBinding, boolean throwOnFailure) Checks that the operand values in aSqlCallto this operator are valid.deriveType(SqlValidator validator, SqlValidatorScope scope, SqlCall call) Derives the type of a call to this operator.voidWrites a SQL representation of a call to this operator to a writer, including parentheses if the operators on either side are of greater precedence.Methods inherited from class org.apache.calcite.sql.SqlSpecialOperator
getSyntax, reduceExprMethods inherited from class org.apache.calcite.sql.SqlOperator
acceptCall, acceptCall, adjustType, allowsFraming, checkOperandCount, constructArgNameList, constructArgTypeList, constructOperandList, createCall, createCall, createCall, createCall, createCall, createCall, createCall, deriveOperandType, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getMonotonicity, getName, getNameAsId, getOperandCountRange, getOperandTypeChecker, 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, validateCall, validateOperands, validRexOperands
-
Constructor Details
-
SqlMultisetQueryConstructor
public SqlMultisetQueryConstructor() -
SqlMultisetQueryConstructor
-
-
Method Details
-
checkOperandTypes
Description copied from class:SqlOperatorChecks that the operand values in aSqlCallto this operator are valid. Subclasses must either override this method or supply an instance ofSqlOperandTypeCheckerto the constructor.- Overrides:
checkOperandTypesin classSqlOperator- Parameters:
callBinding- description of callthrowOnFailure- whether to throw an exception if check fails (otherwise returns false in that case)- Returns:
- whether check succeeded
-
deriveType
Description copied from class:SqlOperatorDerives the type of a call to this operator.This method is an intrinsic part of the validation process so, unlike
SqlOperator.inferReturnType(org.apache.calcite.sql.SqlOperatorBinding), specific operators would not typically override this method.- Overrides:
deriveTypein classSqlOperator- Parameters:
validator- Validatorscope- Scope of validationcall- Call to this operator- Returns:
- Type of call
-
unparse
Description copied from class:SqlOperatorWrites a SQL representation of a call to this operator to a writer, including parentheses if the operators on either side are of greater precedence.The default implementation of this method delegates to
SqlSyntax.unparse(org.apache.calcite.sql.SqlWriter, org.apache.calcite.sql.SqlOperator, org.apache.calcite.sql.SqlCall, int, int).- Overrides:
unparsein classSqlOperator
-
argumentMustBeScalar
public boolean argumentMustBeScalar(int ordinal) Description copied from class:SqlOperatorReturns whether theordinalth argument to this operator must be scalar (as opposed to a query).If true (the default), the validator will attempt to convert the argument into a scalar sub-query, which must have one column and return at most one row.
Operators such as
SELECTandEXISTSoverride this method.- Overrides:
argumentMustBeScalarin classSqlOperator
-