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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
argumentMustBeScalar
(int ordinal) Returns whether theordinal
th 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.boolean
isNotIn()
Deprecated.not()
Returns the operator that is the logical inverse of this operator.boolean
validRexOperands
(int count, Litmus litmus) Returns whether the given operands are valid.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
-
Constructor Details
-
SqlInOperator
-
-
Method Details
-
isNotIn
Deprecated. -
not
Description copied from class:SqlOperator
Returns 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:
not
in classSqlOperator
- See Also:
-
validRexOperands
Description copied from class:SqlOperator
Returns 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 inSqlNode
andRexNode
formats (some examples are CAST and AND), and this method throws internal errors, not user errors.- Overrides:
validRexOperands
in classSqlBinaryOperator
-
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 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:SqlOperator
Returns whether theordinal
th 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
SELECT
andEXISTS
override this method.- Overrides:
argumentMustBeScalar
in classSqlOperator
-