Class SqlInOperator
- Direct Known Subclasses:
SqlQuantifyOperator
IN operator, which tests for a value's
membership in a sub-query or a list of values.-
Field Summary
Fields inherited from class org.apache.calcite.sql.SqlOperator
kind, MDX_PRECEDENCE, NL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanargumentMustBeScalar(int ordinal) Returns whether theordinalth argument to this operator must be scalar (as opposed to a query).deriveType(SqlValidator validator, SqlValidatorScope scope, SqlCall call) Derives the type of a call to this operator.booleanisNotIn()Deprecated.not()Returns the operator that is the logical inverse of this operator.booleanvalidRexOperands(int count, Litmus litmus) Returns whether the given operands are valid.Methods 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
-
Constructor Details
-
SqlInOperator
-
-
Method Details
-
isNotIn
Deprecated. -
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 classSqlOperator- See Also:
-
validRexOperands
Description copied from class:SqlOperatorReturns whether the given operands are valid. If not valid andfail, throws an assertion error.Similar to
SqlOperator.checkOperandCount(org.apache.calcite.sql.validate.SqlValidator, org.apache.calcite.sql.type.SqlOperandTypeChecker, org.apache.calcite.sql.SqlCall), but some operators may have different valid operands inSqlNodeandRexNodeformats (some examples are CAST and AND), and this method throws internal errors, not user errors.- Overrides:
validRexOperandsin classSqlBinaryOperator
-
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 classSqlBinaryOperator- Parameters:
validator- Validatorscope- Scope of validationcall- Call to this operator- Returns:
- Type of call
-
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
-