public class SqlBetweenOperator extends SqlInfixOperator
Syntax:
X [NOT] BETWEEN [ASYMMETRIC | SYMMETRIC] Y AND
Z
If the asymmetric/symmeteric keywords are left out ASYMMETRIC is default.
This operator is always expanded (into something like Y <= X AND
X <= Z) before being converted into Rex nodes.
| Modifier and Type | Class and Description |
|---|---|
static class |
SqlBetweenOperator.Flag
Defines the "SYMMETRIC" and "ASYMMETRIC" keywords.
|
| Modifier and Type | Field and Description |
|---|---|
SqlBetweenOperator.Flag |
flag |
static int |
LOWER_OPERAND
Ordinal of the 'lower' operand.
|
static int |
UPPER_OPERAND
Ordinal of the 'upper' operand.
|
static int |
VALUE_OPERAND
Ordinal of the 'value' operand.
|
kind, MDX_PRECEDENCE, NL| Constructor and Description |
|---|
SqlBetweenOperator(SqlBetweenOperator.Flag flag,
boolean negated) |
| Modifier and Type | Method and Description |
|---|---|
String |
getSignatureTemplate(int operandsCount)
Returns a template describing how the operator signature is to be built.
|
RelDataType |
inferReturnType(SqlOperatorBinding opBinding)
Infers the return type of an invocation of this operator; only called
after the number and types of operands have already been validated.
|
boolean |
isNegated() |
int |
reduceExpr(int opOrdinal,
List<Object> list)
Reduces a list of operators and arguments according to the rules of
precedence and associativity.
|
void |
unparse(SqlWriter writer,
SqlCall call,
int leftPrec,
int rightPrec)
Writes a SQL representation of a call to this operator to a writer,
including parentheses if the operators on either side are of greater
precedence.
|
getSyntaxacceptCall, acceptCall, adjustType, allowsFraming, argumentMustBeScalar, checkOperandCount, checkOperandTypes, createCall, createCall, createCall, createCall, deriveType, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getName, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, hashCode, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isName, leftPrec, preValidateCall, requiresDecimalExpansion, requiresOrder, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateCall, validateOperands, validRexOperandspublic static final int VALUE_OPERAND
public static final int LOWER_OPERAND
public static final int UPPER_OPERAND
public final SqlBetweenOperator.Flag flag
public SqlBetweenOperator(SqlBetweenOperator.Flag flag, boolean negated)
public boolean isNegated()
public RelDataType inferReturnType(SqlOperatorBinding opBinding)
SqlOperatorSqlReturnTypeInference to the constructor.inferReturnType in class SqlOperatoropBinding - description of invocation (not necessarily a
SqlCall)public String getSignatureTemplate(int operandsCount)
SqlOperatorgetSignatureTemplate in class SqlOperatoroperandsCount - is used with functions that can take a variable
number of operandspublic void unparse(SqlWriter writer, SqlCall call, int leftPrec, int rightPrec)
SqlOperatorThe default implementation of this method delegates to
SqlSyntax.unparse(org.apache.calcite.sql.SqlWriter, org.apache.calcite.sql.SqlOperator, org.apache.calcite.sql.SqlCall, int, int).
unparse in class SqlInfixOperatorpublic int reduceExpr(int opOrdinal,
List<Object> list)
SqlSpecialOperatorThe default implementation throws
UnsupportedOperationException.
reduceExpr in class SqlSpecialOperatoropOrdinal - indicating the ordinal of the current operator in the list
on which a possible reduction can be madelist - List of alternating
SqlParserUtil.ToTreeListItem and
SqlNodeCopyright © 2012–2015 The Apache Software Foundation. All rights reserved.