public class SqlInOperator extends SqlBinaryOperator
IN operator, which tests for a value's
membership in a sub-query or a list of values.kind, MDX_PRECEDENCE, NL| Modifier | Constructor and Description |
|---|---|
protected |
SqlInOperator(String name,
SqlKind kind) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
argumentMustBeScalar(int ordinal)
Returns whether the
ordinalth argument to this operator must
be scalar (as opposed to a query). |
RelDataType |
deriveType(SqlValidator validator,
SqlValidatorScope scope,
SqlCall call)
Derives the type of a call to this operator.
|
boolean |
isNotIn()
Deprecated.
|
SqlOperator |
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.
|
adjustType, getMonotonicity, getSignatureTemplate, getSyntax, reverseacceptCall, acceptCall, allowsFraming, checkOperandCount, checkOperandTypes, constructArgNameList, constructArgTypeList, constructOperandList, createCall, createCall, createCall, createCall, createCall, createCall, createCall, 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@Deprecated public boolean isNotIn()
public SqlOperator not()
SqlOperatorFor example, SqlStdOperatorTable.LIKE.not() returns
SqlStdOperatorTable.NOT_LIKE, and vice versa.
By default, returns null, which means there is no inverse
operator.
not in class SqlOperatorSqlOperator.reverse()public boolean validRexOperands(int count,
Litmus litmus)
SqlOperatorfail, 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 in SqlNode and RexNode formats
(some examples are CAST and AND), and this method throws internal errors,
not user errors.
validRexOperands in class SqlBinaryOperatorpublic RelDataType deriveType(SqlValidator validator, SqlValidatorScope scope, SqlCall call)
SqlOperatorThis 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.
deriveType in class SqlBinaryOperatorvalidator - Validatorscope - Scope of validationcall - Call to this operatorpublic boolean argumentMustBeScalar(int ordinal)
SqlOperatorordinalth 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 and EXISTS override
this method.
argumentMustBeScalar in class SqlOperatorCopyright © 2012-2022 Apache Software Foundation. All Rights Reserved.