|
||||||||||
| 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.ResultSetNode
org.apache.derby.impl.sql.compile.FromTable
org.apache.derby.impl.sql.compile.TableOperatorNode
org.apache.derby.impl.sql.compile.JoinNode
org.apache.derby.impl.sql.compile.HalfOuterJoinNode
An HalfOuterJoinNode represents a left or a right outer join result set. Right outer joins are always transformed into left outer joins during preprocessing for simplicity.
| Field Summary | |
private boolean |
rightOuterJoin
|
private boolean |
transformed
|
| Fields inherited from class org.apache.derby.impl.sql.compile.JoinNode |
aggregateVector, CROSSJOIN, flattenableJoin, FULLOUTERJOIN, INNERJOIN, joinClause, joinClauseNormalized, joinPredicates, LEFTOUTERJOIN, RIGHTOUTERJOIN, subqueryList, UNIONJOIN, usingClause |
| Fields inherited from class org.apache.derby.impl.sql.compile.TableOperatorNode |
leftOptimizer, leftResultSet, nestedInParens, rightOptimizer, rightResultSet |
| Fields inherited from class org.apache.derby.impl.sql.compile.FromTable |
bestAccessPath, bestCostEstimate, bestSortAvoidancePath, correlationName, corrTableName, currentAccessPath, hashKeyColumns, initialCapacity, level, loadFactor, maxCapacity, tableNumber, tableProperties, trulyTheBestAccessPath, userSpecifiedJoinStrategy |
| Fields inherited from class org.apache.derby.impl.sql.compile.ResultSetNode |
costEstimate, cursorTargetTable, insertSource, optimizer, referencedTableMap, resultColumns, resultSetNumber, scratchCostEstimate, statementResultSet |
| 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 | |
HalfOuterJoinNode()
|
|
| Method Summary | |
protected int |
addOuterJoinArguments(ActivationClassBuilder acb,
MethodBuilder mb)
Generate and add any arguments specifict to outer joins. |
protected void |
adjustNumberOfRowsReturned(CostEstimate costEstimate)
Some types of joins (e.g. outer joins) will return a different number of rows than is predicted by optimizeIt() in JoinNode. |
void |
generate(ActivationClassBuilder acb,
MethodBuilder mb)
Generate the code for an inner join node. |
(package private) ResultSetNode |
getLogicalLeftResultSet()
Return the logical left result set for this qualified join node. |
(package private) ResultSetNode |
getLogicalRightResultSet()
Return the logical right result set for this qualified join node. |
protected int |
getNumJoinArguments()
Return the number of arguments to the join result set. |
void |
init(java.lang.Object leftResult,
java.lang.Object rightResult,
java.lang.Object onClause,
java.lang.Object usingClause,
java.lang.Object rightOuterJoin,
java.lang.Object tableProperties)
Initializer for a HalfOuterJoinNode. |
boolean |
isRightOuterJoin()
Return true if right outer join or false if left outer join Used to set Nullability correctly in JoinNode |
boolean |
LOJ_bindResultColumns(boolean anyChange)
|
boolean |
LOJ_reorderable(int numTables)
This method determines if (1) the query is a LOJ, and (2) if the LOJ is a candidate for reordering (i.e., linearization). |
JBitSet |
LOJgetNPReferencedTables(int numTables)
|
protected void |
oneRowRightSide(ActivationClassBuilder acb,
MethodBuilder mb)
|
ResultSetNode |
preprocess(int numTables,
GroupByList gbl,
FromList fromList)
Put a ProjectRestrictNode on top of each FromTable in the FromList. |
void |
pushExpressions(PredicateList outerPredicateList)
Push expressions down to the first ResultSetNode which can do expression evaluation and has the same referenced table map. |
boolean |
pushOptPredicate(OptimizablePredicate optimizablePredicate)
Push an OptimizablePredicate down, if this node accepts it. |
java.lang.String |
toString()
Convert this object to a String. |
FromTable |
transformOuterJoins(ValueNode predicateTree,
int numTables)
Transform any Outer Join into an Inner Join where applicable. |
| Methods inherited from class org.apache.derby.impl.sql.compile.JoinNode |
accept, bindResultColumns, bindResultColumns, flatten, generateCore, generateCore, getAllResultColumns, getLeftPredicateList, getMatchingColumn, getRightPredicateList, isFlattenableJoinNode, isOrderedOn, joinTypeToString, LOJgetReferencedTables, modifyAccessPath, normExpressions, notFlattenableJoin, optimizeIt, printSubNodes, projectResultColumns, pushExpressionsToLeft, setAggregateVector, setSubqueryList, updateTargetLockMode |
| Methods inherited from class org.apache.derby.impl.sql.compile.TableOperatorNode |
bindExpressions, bindExpressionsWithTables, bindNonVTITables, bindVTITables, decrementLevel, getExposedName, getFromTableByName, getLeftmostResultSet, getLeftResultSet, getNestedInParens, getRightResultSet, init, markOrderingDependent, modifyAccessPaths, needsSpecialRCLBinding, optimize, optimizeSource, referencesSessionSchema, referencesTarget, rejectParameters, replaceDefaults, setLeftmostResultSet, setLevel, setNestedInParens, setReferencedColumns, verifyProperties |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.derby.iapi.sql.compile.Optimizable |
getDataDictionary, getReferencedTableMap, getResultSetNumber |
| Field Detail |
private boolean rightOuterJoin
private boolean transformed
| Constructor Detail |
public HalfOuterJoinNode()
| Method Detail |
public void init(java.lang.Object leftResult,
java.lang.Object rightResult,
java.lang.Object onClause,
java.lang.Object usingClause,
java.lang.Object rightOuterJoin,
java.lang.Object tableProperties)
throws StandardException
init in class JoinNodeleftResult - The ResultSetNode on the left side of this joinrightResult - The ResultSetNode on the right side of this joinonClause - The ON clauseusingClause - The USING clauserightOuterJoin - Whether or not this node represents a user
specified right outer jointableProperties - Properties list associated with the table
StandardException - Thrown on error
public boolean pushOptPredicate(OptimizablePredicate optimizablePredicate)
throws StandardException
Optimizable
pushOptPredicate in interface OptimizablepushOptPredicate in class JoinNodeStandardException - Thrown on errorOptimizable.pushOptPredicate(org.apache.derby.iapi.sql.compile.OptimizablePredicate)public java.lang.String toString()
toString in class TableOperatorNode
public ResultSetNode preprocess(int numTables,
GroupByList gbl,
FromList fromList)
throws StandardException
preprocess in class JoinNodenumTables - Number of tables in the DML Statementgbl - The group by list, if anyfromList - The from list, if any
StandardException - Thrown on error
public void pushExpressions(PredicateList outerPredicateList)
throws StandardException
pushExpressions in class JoinNodeouterPredicateList - The PredicateList from the outer RS.
StandardException - Thrown on error
public boolean LOJ_reorderable(int numTables)
throws StandardException
LOJ_reorderable in class JoinNodeStandardException
public boolean LOJ_bindResultColumns(boolean anyChange)
throws StandardException
StandardException
public FromTable transformOuterJoins(ValueNode predicateTree,
int numTables)
throws StandardException
transformOuterJoins in class JoinNodepredicateTree - The predicate tree for the query block
StandardException - Thrown on errorprotected void adjustNumberOfRowsReturned(CostEstimate costEstimate)
JoinNode
adjustNumberOfRowsReturned in class JoinNodeJoinNode.adjustNumberOfRowsReturned(org.apache.derby.iapi.sql.compile.CostEstimate)
public void generate(ActivationClassBuilder acb,
MethodBuilder mb)
throws StandardException
generate in class JoinNodeStandardException - Thrown on error
protected int addOuterJoinArguments(ActivationClassBuilder acb,
MethodBuilder mb)
throws StandardException
addOuterJoinArguments in class JoinNodeacb - The ActivationClassBuildermb - the method the generate code is to go into
return The args that have been added
StandardException - Thrown on errorprotected int getNumJoinArguments()
getNumJoinArguments in class JoinNode
protected void oneRowRightSide(ActivationClassBuilder acb,
MethodBuilder mb)
oneRowRightSide in class JoinNodeResultSetNode getLogicalLeftResultSet()
getLogicalLeftResultSet in class JoinNodeResultSetNode getLogicalRightResultSet()
getLogicalRightResultSet in class JoinNodepublic boolean isRightOuterJoin()
public JBitSet LOJgetNPReferencedTables(int numTables)
throws StandardException
StandardException
|
Built on Tue 2006-10-10 19:23:47+0200, from revision exported | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||