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 SOME
operators.
Each is used in combination with a relational operator:
<
, ≤
,
>
, ≥
,
=
, <>
.
ANY
is a synonym for SOME
.
-
Field Summary
Fields 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.@Nullable RelDataType
tryDeriveTypeForCollection
(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, not, validRexOperands
Methods inherited from class org.apache.calcite.sql.SqlBinaryOperator
adjustType, getMonotonicity, getSignatureTemplate, getSyntax, reverse
Methods 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, 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:SqlOperator
Derives 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:
deriveType
in 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.
-