|
||||||||||
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.SetOperatorNode
org.apache.derby.impl.sql.compile.UnionNode
A UnionNode represents a UNION in a DML statement. It contains a boolean telling whether the union operation should eliminate duplicate rows.
Field Summary | |
private boolean |
addNewNodesCalled
|
(package private) boolean |
tableConstructor
|
(package private) boolean |
topTableConstructor
|
Fields inherited from class org.apache.derby.impl.sql.compile.SetOperatorNode |
all, orderByList |
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 | |
UnionNode()
|
Method Summary | |
private ResultSetNode |
addNewNodes()
Add any new ResultSetNodes that are necessary to the tree. |
void |
bindExpressions(FromList fromListParam)
Bind the expressions under this TableOperatorNode. |
void |
generate(ActivationClassBuilder acb,
MethodBuilder mb)
Generate the code for this UnionNode. |
(package private) java.lang.String |
getOperatorName()
|
void |
init(java.lang.Object leftResult,
java.lang.Object rightResult,
java.lang.Object all,
java.lang.Object tableConstructor,
java.lang.Object tableProperties)
Initializer for a UnionNode. |
void |
markTopTableConstructor()
Mark this as the top node of a table constructor. |
Optimizable |
modifyAccessPath(JBitSet outerTables)
Modify the access path for this Optimizable, as necessary. |
ResultSetNode |
modifyAccessPaths()
Modify the access paths according to the decisions the optimizer made. |
CostEstimate |
optimizeIt(Optimizer optimizer,
OptimizablePredicateList predList,
CostEstimate outerCost,
RowOrdering rowOrdering)
Choose the best access path for this Optimizable. |
void |
rejectParameters()
Check for (and reject) ? |
(package private) void |
setTableConstructorTypes(ResultColumnList typeColumns)
Set the type of column in the result column lists of each source of this union tree to the type in the given result column list (which represents the result columns for an insert). |
(package private) boolean |
tableConstructor()
Tell whether this is a UNION for a table constructor. |
java.lang.String |
toString()
Convert this object to a String. |
Methods inherited from class org.apache.derby.impl.sql.compile.SetOperatorNode |
bindResultColumns, bindResultColumns, bindTargetExpressions, bindUntypedNullsToResultColumns, enhanceRCLForInsert, ensurePredicateList, flattenableInFromSubquery, getFromTableByName, getParamColumnTypes, init, performMaterialization, preprocess, pushOrderByList, setParamColumnTypes, setResultToBooleanTrueNode, verifySelectStarSubquery |
Methods inherited from class org.apache.derby.impl.sql.compile.TableOperatorNode |
accept, bindExpressionsWithTables, bindNonVTITables, bindVTITables, decrementLevel, getExposedName, getLeftmostResultSet, getLeftResultSet, getNestedInParens, getRightResultSet, init, markOrderingDependent, needsSpecialRCLBinding, optimize, optimizeSource, printSubNodes, projectResultColumns, referencesSessionSchema, referencesTarget, 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 addNewNodesCalled
boolean tableConstructor
boolean topTableConstructor
Constructor Detail |
public UnionNode()
Method Detail |
public void init(java.lang.Object leftResult, java.lang.Object rightResult, java.lang.Object all, java.lang.Object tableConstructor, java.lang.Object tableProperties) throws StandardException
init
in class QueryTreeNode
leftResult
- The ResultSetNode on the left side of this unionrightResult
- The ResultSetNode on the right side of this unionall
- Whether or not this is a UNION ALL.tableConstructor
- Whether or not this is from a table constructor.tableProperties
- Properties list associated with the table
StandardException
- Thrown on errorpublic void markTopTableConstructor()
boolean tableConstructor()
public void rejectParameters() throws StandardException
rejectParameters
in class TableOperatorNode
StandardException
- Thrown if a ? parameter found
directly under a ResultColumnvoid setTableConstructorTypes(ResultColumnList typeColumns) throws StandardException
setTableConstructorTypes
in class ResultSetNode
typeColumns
- The ResultColumnList containing the desired result
types.
StandardException
- Thrown on errorpublic CostEstimate optimizeIt(Optimizer optimizer, OptimizablePredicateList predList, CostEstimate outerCost, RowOrdering rowOrdering) throws StandardException
Optimizable
optimizeIt
in interface Optimizable
optimizeIt
in class FromTable
StandardException
- Thrown on errorOptimizable.optimizeIt(org.apache.derby.iapi.sql.compile.Optimizer, org.apache.derby.iapi.sql.compile.OptimizablePredicateList, org.apache.derby.iapi.sql.compile.CostEstimate, org.apache.derby.iapi.sql.compile.RowOrdering)
public Optimizable modifyAccessPath(JBitSet outerTables) throws StandardException
Optimizable
modifyAccessPath
in interface Optimizable
modifyAccessPath
in class TableOperatorNode
StandardException
- Thrown on errorOptimizable.modifyAccessPath(org.apache.derby.iapi.util.JBitSet)
public ResultSetNode modifyAccessPaths() throws StandardException
ResultSetNode
modifyAccessPaths
in class TableOperatorNode
StandardException
- Thrown on errorResultSetNode.modifyAccessPaths()
private ResultSetNode addNewNodes() throws StandardException
StandardException
- Thrown on errorpublic java.lang.String toString()
toString
in class SetOperatorNode
public void bindExpressions(FromList fromListParam) throws StandardException
bindExpressions
in class TableOperatorNode
StandardException
- Thrown on errorpublic void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException
generate
in class QueryTreeNode
acb
- The ActivationClassBuilder for the class being builtmb
- The method for the generated code to go into
StandardException
- Thrown on errorjava.lang.String getOperatorName()
getOperatorName
in class SetOperatorNode
|
Built on Mon 2007-06-04 09:58:47+0400, from revision ??? | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |