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 |
|---|---|
(package private) |
SqlInOperator(SqlKind kind)
Creates a SqlInOperator.
|
protected |
SqlInOperator(String name,
SqlKind kind) |
| Modifier and Type | Method and Description |
|---|---|
private static boolean |
anyNullable(List<RelDataTypeField> fieldList) |
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.
|
boolean |
validRexOperands(int count,
Litmus litmus)
Returns whether the given operands are valid.
|
adjustType, getMonotonicity, getSignatureTemplate, getSyntaxacceptCall, acceptCall, allowsFraming, checkOperandCount, checkOperandTypes, constructArgNameList, constructArgTypeList, constructOperandList, createCall, createCall, createCall, createCall, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getName, getNameAsId, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, hashCode, inferReturnType, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isGroup, isGroupAuxiliary, isName, leftPrec, preValidateCall, requiresDecimalExpansion, requiresOrder, requiresOver, rewriteCall, rightPrec, toString, unparse, unparseListClause, unparseListClause, validateCall, validateOperandsSqlInOperator(SqlKind kind)
kind - IN or NOT IN@Deprecated public boolean isNotIn()
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 operatorprivate static boolean anyNullable(List<RelDataTypeField> fieldList)
public 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–2018 The Apache Software Foundation. All rights reserved.