Package org.apache.calcite.sql.fun
Class SqlQuantifyOperator
java.lang.Object
org.apache.calcite.sql.SqlOperator
org.apache.calcite.sql.SqlBinaryOperator
org.apache.calcite.sql.fun.SqlInOperator
org.apache.calcite.sql.fun.SqlQuantifyOperator
Definition of the SQL
ALL and SOMEoperators.
Each is used in combination with a relational operator:
<, ≤,
>, ≥,
=, <>.
ANY is a synonym for SOME.
-
Field Summary
FieldsFields inherited from class org.apache.calcite.sql.SqlOperator
kind, MDX_PRECEDENCE, NL -
Method Summary
Modifier and TypeMethodDescriptionderiveType(SqlValidator validator, SqlValidatorScope scope, SqlCall call) Derives the type of a call to this operator.not()Returns the operator that is the logical inverse of this operator.@Nullable RelDataTypetryDeriveTypeForCollection(SqlValidator validator, SqlValidatorScope scope, SqlCall call) Derive type for SOME(collection expression), ANY (collection expression).Methods inherited from class org.apache.calcite.sql.fun.SqlInOperator
argumentMustBeScalar, isNotIn, validRexOperandsMethods inherited from class org.apache.calcite.sql.SqlBinaryOperator
adjustType, getMonotonicity, getSignatureTemplate, getSyntax, reverseMethods inherited from class org.apache.calcite.sql.SqlOperator
acceptCall, acceptCall, allowsFraming, checkOperandCount, checkOperandTypes, constructArgNameList, constructArgTypeList, constructOperandList, createCall, createCall, createCall, createCall, createCall, createCall, createCall, deriveOperandType, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getName, getNameAsId, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSqlCallFactory, getStrongPolicyInference, hashCode, inferReturnType, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isGroup, isGroupAuxiliary, isName, isSymmetrical, leftPrec, preValidateCall, requiresDecimalExpansion, requiresOrder, requiresOver, rewriteCall, rightPrec, toString, unparse, unparseListClause, unparseListClause, validateCall, validateOperands
-
Field Details
-
comparisonKind
-
-
Method Details
-
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 classSqlInOperator- Parameters:
validator- Validatorscope- Scope of validationcall- Call to this operator- Returns:
- Type of call
-
tryDeriveTypeForCollection
public @Nullable RelDataType tryDeriveTypeForCollection(SqlValidator validator, SqlValidatorScope scope, SqlCall call) Derive type for SOME(collection expression), ANY (collection expression).- Parameters:
validator- Validatorscope- Scope of validationcall- Call to this operator- Returns:
- If SOME or ALL is applied to a collection, then the function returns type of call, otherwise it returns null.
-
not
Description copied from class:SqlOperatorReturns the operator that is the logical inverse of this operator.For example,
SqlStdOperatorTable.LIKE.not()returnsSqlStdOperatorTable.NOT_LIKE, and vice versa.By default, returns
null, which means there is no inverse operator.- Overrides:
notin classSqlInOperator- See Also:
-