org.apache.derby.impl.sql.compile
Class QuantifiedBinaryOperatorNode

java.lang.Object
  extended byorg.apache.derby.impl.sql.compile.QueryTreeNode
      extended byorg.apache.derby.impl.sql.compile.ValueNode
          extended byorg.apache.derby.impl.sql.compile.BinaryOperatorNode
              extended byorg.apache.derby.impl.sql.compile.QuantifiedBinaryOperatorNode
All Implemented Interfaces:
Visitable

public class QuantifiedBinaryOperatorNode
extends BinaryOperatorNode

A QuantifiedBinaryOperatorNode represents a binary quantified predicate that is used with a subquery, such as IN, NOT IN, < ALL, etc. Quantified predicates all return Boolean values. All quantified operators will be removed from the tree by the time we get to code generation - they will be replaced by other constructs that can be compiled. For example, an IN node may be converted to a type of join.

Author:
Jeff Lichtman

Field Summary
static int EQ_ALL
           
static int EQ_ANY
           
static int GE_ALL
           
static int GE_ANY
           
static int GT_ALL
           
static int GT_ANY
           
static int IN
           
static int LE_ALL
           
static int LE_ANY
           
(package private)  ValueNode leftOperand
           
static int LT_ALL
           
static int LT_ANY
           
static int NE_ALL
           
static int NE_ANY
           
static int NOT_IN
           
(package private)  int operator
           
(package private)  SubqueryNode rightOperand
           
 
Fields inherited from class org.apache.derby.impl.sql.compile.BinaryOperatorNode
AND, CONCATENATE, DIVIDE, EQ, GE, GT, LE, leftInterfaceType, LIKE, LT, methodName, MINUS, NE, OR, PLUS, receiver, rightInterfaceType, TIMES
 
Fields inherited from class org.apache.derby.impl.sql.compile.ValueNode
clause, dataTypeServices, IN_HAVING_CLAUSE, IN_SELECT_LIST, IN_UNKNOWN_CLAUSE, IN_WHERE_CLAUSE, transformed
 
Fields inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, beginOffset, endOffset
 
Constructor Summary
QuantifiedBinaryOperatorNode()
           
 
Method Summary
 ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, java.util.Vector aggregateVector)
          Bind this expression.
 void printSubNodes(int depth)
          Prints the sub-nodes of this object.
 
Methods inherited from class org.apache.derby.impl.sql.compile.BinaryOperatorNode
accept, categorize, constantExpression, generateExpression, genSQLJavaSQLTree, getLeftOperand, getOrderableVariantType, getReceiverInterfaceName, getRightOperand, init, init, initializeResultField, isConstantExpression, preprocess, remapColumnReferencesToExpressions, setClause, setLeftOperand, setLeftRightInterfaceType, setMethodName, setOperator, setRightOperand, swapOperands, toString
 
Methods inherited from class org.apache.derby.impl.sql.compile.ValueNode
bindExpression, changeToCNF, checkIsBoolean, checkReliability, checkReliability, checkTopPredicatesForEqualsConditions, copyFields, eliminateNots, genEqualsFalseTree, generate, generateFilter, genIsNullTree, getClause, getClone, getColumnName, getConstantValueAsObject, getDataValueFactory, getSchemaName, getSourceResultColumn, getTableName, getTablesReferenced, getTransformed, getTypeCompiler, getTypeId, getTypeServices, init, isBinaryEqualsOperatorNode, isBooleanFalse, isBooleanTrue, isCloneable, isParameterNode, isRelationalOperator, optimizableEqualityNode, putAndsOnTop, selectivity, setDescriptor, setTransformed, setType, verifyChangeToCNF, verifyEliminateNots, verifyPutAndsOnTop
 
Methods inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
bind, convertDefaultNode, debugFlush, debugPrint, executeSchemaName, executeStatementName, formatNodeString, foundString, generate, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContextManager, getCursorInfo, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getNodeFactory, getNodeType, getNullNode, getParameterTypes, getRowEstimate, getSchemaDescriptor, getSchemaDescriptor, getSPSName, getStatementType, getTableDescriptor, getTypeCompiler, init, init, init, init, init, init, init, init, init, init, init, isAtomic, isInstanceOf, isSessionSchema, isSessionSchema, makeConstantAction, makeResultDescription, makeTableName, needsSavepoint, nodeHeader, optimize, parseQueryText, printLabel, referencesSessionSchema, setBeginOffset, setContextManager, setEndOffset, setNodeType, setRefActionInfo, treePrint, treePrint, verifyClassExist
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

operator

int operator

IN

public static final int IN
See Also:
Constant Field Values

NOT_IN

public static final int NOT_IN
See Also:
Constant Field Values

EQ_ANY

public static final int EQ_ANY
See Also:
Constant Field Values

EQ_ALL

public static final int EQ_ALL
See Also:
Constant Field Values

NE_ANY

public static final int NE_ANY
See Also:
Constant Field Values

NE_ALL

public static final int NE_ALL
See Also:
Constant Field Values

GT_ANY

public static final int GT_ANY
See Also:
Constant Field Values

GT_ALL

public static final int GT_ALL
See Also:
Constant Field Values

GE_ANY

public static final int GE_ANY
See Also:
Constant Field Values

GE_ALL

public static final int GE_ALL
See Also:
Constant Field Values

LT_ANY

public static final int LT_ANY
See Also:
Constant Field Values

LT_ALL

public static final int LT_ALL
See Also:
Constant Field Values

LE_ANY

public static final int LE_ANY
See Also:
Constant Field Values

LE_ALL

public static final int LE_ALL
See Also:
Constant Field Values

leftOperand

ValueNode leftOperand

rightOperand

SubqueryNode rightOperand
Constructor Detail

QuantifiedBinaryOperatorNode

public QuantifiedBinaryOperatorNode()
Method Detail

printSubNodes

public void printSubNodes(int depth)
Prints the sub-nodes of this object. See QueryTreeNode.java for how tree printing is supposed to work.

Overrides:
printSubNodes in class BinaryOperatorNode
Parameters:
depth - The depth of this node in the tree
Returns:
Nothing

bindExpression

public ValueNode bindExpression(FromList fromList,
                                SubqueryList subqueryList,
                                java.util.Vector aggregateVector)
                         throws StandardException
Bind this expression. This means binding the sub-expressions, as well as figuring out what the return type is for this expression.

Overrides:
bindExpression in class BinaryOperatorNode
Parameters:
fromList - The FROM list for the query this expression is in, for binding columns.
subqueryList - The subquery list being built as we find SubqueryNodes
aggregateVector - The aggregate vector being built as we find AggregateNodes
Returns:
The new top of the expression tree.
Throws:
StandardException - Thrown on error


Apache Derby V10.0 Engine Documentation - Copyright © 1997,2004 The Apache Software Foundation or its licensors, as applicable.