|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.impl.sql.compile.QueryTreeNode
org.apache.derby.impl.sql.compile.ValueNode
org.apache.derby.impl.sql.compile.BinaryListOperatorNode
org.apache.derby.impl.sql.compile.InListOperatorNode
public final class InListOperatorNode
An InListOperatorNode represents an IN list.
Field Summary | |
---|---|
private boolean |
isOrdered
|
private boolean |
sortDescending
|
Fields inherited from class org.apache.derby.impl.sql.compile.BinaryListOperatorNode |
---|
leftInterfaceType, leftOperand, methodName, operator, receiver, rightInterfaceType, rightOperandList |
Fields inherited from class org.apache.derby.impl.sql.compile.ValueNode |
---|
transformed |
Fields inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode |
---|
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, isPrivilegeCollectionRequired |
Constructor Summary | |
---|---|
InListOperatorNode()
|
Method Summary | |
---|---|
(package private) ValueNode |
eliminateNots(boolean underNotNode)
Eliminate NotNodes in the current query block. |
void |
generateExpression(ExpressionClassBuilder acb,
MethodBuilder mb)
Do code generation for this IN list operator. |
protected LocalField |
generateListAsArray(ExpressionClassBuilder acb,
MethodBuilder mb)
Generate the code to create an array of DataValueDescriptors that will hold the IN-list values at execution time. |
void |
generateStartStopKey(boolean isAsc,
boolean isStartKey,
ExpressionClassBuilder acb,
MethodBuilder mb)
Generate start/stop key for this IN list operator. |
void |
init(java.lang.Object leftOperand,
java.lang.Object rightOperandList)
Initializer for a InListOperatorNode |
protected boolean |
isOrdered()
Return whether or not the IN-list values for this node are ordered. |
protected void |
markAsOrdered()
Indicate that the IN-list values for this node are ordered (i.e. they are all constants and they have been sorted). |
protected void |
markSortDescending()
Indicate that the IN-list values for this node must be sorted in DESCENDING order. |
ValueNode |
preprocess(int numTables,
FromList outerFromList,
SubqueryList outerSubqueryList,
PredicateList outerPredicateList)
Preprocess an expression tree. |
double |
selectivity(Optimizable optTable)
The selectivity for an "IN" predicate is generally very small. |
boolean |
selfReference(ColumnReference cr)
See if this IN list operator is referencing the same table. |
protected InListOperatorNode |
shallowCopy()
Create a shallow copy of this InListOperatorNode whose operands are the same as this node's operands. |
protected boolean |
sortDescending()
Return whether or not the IN-list values for this node must be sorted in DESCENDING order. |
java.lang.String |
toString()
Convert this object to a String. |
Methods inherited from class org.apache.derby.impl.sql.compile.BinaryListOperatorNode |
---|
acceptChildren, bindComparisonOperator, bindExpression, categorize, constantExpression, getLeftOperand, getOrderableVariantType, getRightOperandList, init, isConstantExpression, isEquivalent, printSubNodes, remapColumnReferencesToExpressions, setLeftOperand, setRightOperandList |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private boolean isOrdered
private boolean sortDescending
Constructor Detail |
---|
public InListOperatorNode()
Method Detail |
---|
public void init(java.lang.Object leftOperand, java.lang.Object rightOperandList)
init
in class QueryTreeNode
leftOperand
- The left operand of the noderightOperandList
- The right operand list of the nodepublic java.lang.String toString()
toString
in class BinaryListOperatorNode
protected InListOperatorNode shallowCopy() throws StandardException
StandardException
public ValueNode preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException
preprocess
in class BinaryListOperatorNode
numTables
- Number of tables in the DML StatementouterFromList
- FromList from outer query blockouterSubqueryList
- SubqueryList from outer query blockouterPredicateList
- PredicateList from outer query block
StandardException
- Thrown on errorValueNode eliminateNots(boolean underNotNode) throws StandardException
eliminateNots
in class ValueNode
underNotNode
- Whether or not we are under a NotNode.
StandardException
- Thrown on errorpublic boolean selfReference(ColumnReference cr) throws StandardException
cr
- The column reference.
StandardException
- Thrown on errorpublic double selectivity(Optimizable optTable)
selectivity
in class ValueNode
public void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException
generateExpression
in class ValueNode
acb
- The ExpressionClassBuilder for the class we're generatingmb
- The MethodBuilder the expression will go into
StandardException
- Thrown on errorprotected LocalField generateListAsArray(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException
acb
- The ExpressionClassBuilder for the class we're generatingmb
- The MethodBuilder the expression will go into
StandardException
public void generateStartStopKey(boolean isAsc, boolean isStartKey, ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException
isAsc
- is the index ascending on the column in questionisStartKey
- are we generating start key or notacb
- The ExpressionClassBuilder for the class we're generatingmb
- The MethodBuilder the expression will go into
StandardException
- Thrown on errorprotected void markAsOrdered()
protected void markSortDescending()
protected boolean isOrdered()
protected boolean sortDescending()
|
Built on Thu 2012-03-29 21:53:33+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |