| java.lang.Object org.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
All known Subclasses: org.apache.derby.impl.sql.compile.IntersectOrExceptNode, org.apache.derby.impl.sql.compile.UnionNode,
SetOperatorNode | abstract class SetOperatorNode extends TableOperatorNode (Code) | | A SetOperatorNode represents a UNION, INTERSECT, or EXCEPT in a DML statement. Binding and optimization
preprocessing is the same for all of these operations, so they share bind methods in this abstract class.
The class contains a boolean telling whether the operation should eliminate
duplicate rows.
author: Jeff Lichtman |
Method Summary | |
public void | bindResultColumns(FromList fromListParam) Bind the result columns of this ResultSetNode when there is no
base table to bind them to. | public void | bindResultColumns(TableDescriptor targetTableDescriptor, FromVTI targetVTI, ResultColumnList targetColumnList, DMLStatementNode statement, FromList fromListParam) Bind the result columns for this ResultSetNode to a base table.
This is useful for INSERT and UPDATE statements, where the
result columns get their types from the table being updated or
inserted into.
If a result column list is specified, then the verification that the
result column list does not contain any duplicates will be done when
binding them by name.
Parameters: targetTableDescriptor - The TableDescriptor for the table beingupdated or inserted into Parameters: targetColumnList - For INSERT statements, the userdoes not have to supply columnnames (for example, "insert into tvalues (1,2,3)". | public void | bindTargetExpressions(FromList fromListParam) Bind the expressions in the target list. | public void | bindUntypedNullsToResultColumns(ResultColumnList rcl) Bind the result columns of a table constructor to the types in the
given ResultColumnList. | public ResultSetNode | enhanceRCLForInsert(int numTargetColumns, int[] colMap, DataDictionary dataDictionary, TableDescriptor targetTD, FromVTI targetVTI) This ResultSet is the source for an Insert. | public ResultSetNode | ensurePredicateList(int numTables) Ensure that the top of the RSN tree has a PredicateList.
Parameters: numTables - The number of tables in the query. | public boolean | flattenableInFromSubquery(FromList fromList) Evaluate whether or not the subquery in a FromSubquery is flattenable. | protected FromTable | getFromTableByName(String name, String schemaName, boolean exactMatch) Determine whether or not the specified name is an exposed name in
the current query block.
Parameters: name - The specified name to search for as an exposed name. Parameters: schemaName - Schema name, if non-null. Parameters: exactMatch - Whether or not we need an exact match on specified schema and tablenames or match on table id. | PredicateList | getLeftOptPredicateList() Retrieve the list of optimizable predicates that are
targeted for the left child. | abstract String | getOperatorName() | int | getParamColumnTypes(DataTypeDescriptor[] types, RowResultSetNode rrsn) Get the parameter types from the given RowResultSetNode into the
given array of types. | PredicateList | getRightOptPredicateList() Retrieve the list of optimizable predicates that are
targeted for the right child. | protected boolean | hasUnPushedPredicates() It's possible that we tried to push predicates to this node's
children but failed to do so. | public void | init(Object leftResult, Object rightResult, Object all, Object tableProperties) Initializer for a SetOperatorNode. | public Optimizable | modifyAccessPath(JBitSet outerTables, PredicateList predList) | public boolean | performMaterialization(JBitSet outerTables) Return whether or not to materialize this ResultSet tree. | public ResultSetNode | preprocess(int numTables, GroupByList gbl, FromList fromList) Put a ProjectRestrictNode on top of each FromTable in the FromList.
ColumnReferences must continue to point to the same ResultColumn, so
that ResultColumn must percolate up to the new PRN. | public void | pullOptPredicates(OptimizablePredicateList optimizablePredicates) | public boolean | pushOptPredicate(OptimizablePredicate optimizablePredicate) See Also: org.apache.derby.iapi.sql.compile.Optimizable.pushOptPredicate See Also: Take a predicate and push it down to both the left AND right result See Also: sets. | void | pushOrderByList(OrderByList orderByList) Push the order by list down from the cursor node
into its child result set so that the optimizer
has all of the information that it needs to
consider sort avoidance. | void | setParamColumnTypes(DataTypeDescriptor[] types, RowResultSetNode rrsn) Set the type of each ? parameter in the given RowResultSetNode
according to its ordinal position in the given array of types. | public void | setResultToBooleanTrueNode(boolean onlyConvertAlls) Set the result column for the subquery to a boolean true,
Useful for transformations such as
changing:
where exists (select ... | public String | toString() Convert this object to a String. | public void | verifySelectStarSubquery(FromList outerFromList, int subqueryType) Verify that a SELECT * is valid for this type of subquery. |
all | boolean all(Code) | | Tells whether to eliminate duplicate rows. all == TRUE means do
not eliminate duplicates, all == FALSE means eliminate duplicates.
|
bindResultColumns | public void bindResultColumns(FromList fromListParam) throws StandardException(Code) | | Bind the result columns of this ResultSetNode when there is no
base table to bind them to. This is useful for SELECT statements,
where the result columns get their types from the expressions that
live under them.
Parameters: fromListParam - FromList to use/append to. exception: StandardException - Thrown on error |
bindResultColumns | public void bindResultColumns(TableDescriptor targetTableDescriptor, FromVTI targetVTI, ResultColumnList targetColumnList, DMLStatementNode statement, FromList fromListParam) throws StandardException(Code) | | Bind the result columns for this ResultSetNode to a base table.
This is useful for INSERT and UPDATE statements, where the
result columns get their types from the table being updated or
inserted into.
If a result column list is specified, then the verification that the
result column list does not contain any duplicates will be done when
binding them by name.
Parameters: targetTableDescriptor - The TableDescriptor for the table beingupdated or inserted into Parameters: targetColumnList - For INSERT statements, the userdoes not have to supply columnnames (for example, "insert into tvalues (1,2,3)". When thisparameter is null, it means thatthe user did not supply columnnames, and so the binding shouldbe done based on order. When itis not null, it means do the bindingby name, not position. Parameters: statement - Calling DMLStatementNode (Insert or Update) Parameters: fromListParam - FromList to use/append to. exception: StandardException - Thrown on error |
bindTargetExpressions | public void bindTargetExpressions(FromList fromListParam) throws StandardException(Code) | | Bind the expressions in the target list. This means binding the
sub-expressions, as well as figuring out what the return type is
for each expression. This is useful for EXISTS subqueries, where we
need to validate the target list before blowing it away and replacing
it with a SELECT true.
exception: StandardException - Thrown on error |
bindUntypedNullsToResultColumns | public void bindUntypedNullsToResultColumns(ResultColumnList rcl) throws StandardException(Code) | | Bind the result columns of a table constructor to the types in the
given ResultColumnList. Use when inserting from a table constructor,
and there are nulls in the values clauses.
Parameters: rcl - The ResultColumnList with the types to bind to exception: StandardException - Thrown on error. |
enhanceRCLForInsert | public ResultSetNode enhanceRCLForInsert(int numTargetColumns, int[] colMap, DataDictionary dataDictionary, TableDescriptor targetTD, FromVTI targetVTI) throws StandardException(Code) | | This ResultSet is the source for an Insert. The target RCL
is in a different order and/or a superset of this RCL. In most cases
we will reorder and/or add defaults to the current RCL so that is
matches the target RCL. Those RSNs whose generate() method does
not handle projects will insert a PRN, with a new RCL which matches
the target RCL, above the current RSN.
NOTE - The new or enhanced RCL will be fully bound.
Parameters: numTargetColumns - # of columns in target RCL Parameters: colMap - int array representation of correspondence betweenRCLs - colmap[i] = -1 -> missing in current RCLcolmap[i] = j -> targetRCL(i) <-> thisRCL(j+1) Parameters: dataDictionary - DataDictionary to use Parameters: targetTD - TableDescriptor for target if the target is not a VTI, null if a VTI Parameters: targetVTI - Target description if it is a VTI, null if not a VTI ResultSetNode The new top of the tree exception: StandardException - Thrown on error |
ensurePredicateList | public ResultSetNode ensurePredicateList(int numTables) throws StandardException(Code) | | Ensure that the top of the RSN tree has a PredicateList.
Parameters: numTables - The number of tables in the query. ResultSetNode A RSN tree with a node which has a PredicateList on top. exception: StandardException - Thrown on error |
flattenableInFromSubquery | public boolean flattenableInFromSubquery(FromList fromList)(Code) | | Evaluate whether or not the subquery in a FromSubquery is flattenable.
Currently, a FSqry is flattenable if all of the following are true:
o Subquery is a SelectNode. (ie, not a RowResultSetNode or a UnionNode)
o It contains no top level subqueries. (RESOLVE - we can relax this)
o It does not contain a group by or having clause
o It does not contain aggregates.
Parameters: fromList - The outer from list boolean Whether or not the FromSubquery is flattenable. |
getFromTableByName | protected FromTable getFromTableByName(String name, String schemaName, boolean exactMatch) throws StandardException(Code) | | Determine whether or not the specified name is an exposed name in
the current query block.
Parameters: name - The specified name to search for as an exposed name. Parameters: schemaName - Schema name, if non-null. Parameters: exactMatch - Whether or not we need an exact match on specified schema and tablenames or match on table id. The FromTable, if any, with the exposed name. exception: StandardException - Thrown on error |
getLeftOptPredicateList | PredicateList getLeftOptPredicateList() throws StandardException(Code) | | Retrieve the list of optimizable predicates that are
targeted for the left child. Create a new (empty)
list if the list is null.
|
getOperatorName | abstract String getOperatorName()(Code) | | the operator name: "UNION", "INTERSECT", or "EXCEPT" |
getParamColumnTypes | int getParamColumnTypes(DataTypeDescriptor[] types, RowResultSetNode rrsn) throws StandardException(Code) | | Get the parameter types from the given RowResultSetNode into the
given array of types. If an array position is already filled in,
don't clobber it.
Parameters: types - The array of types to fill in Parameters: rrsn - The RowResultSetNode from which to take the param types The number of new types found in the RowResultSetNode |
getRightOptPredicateList | PredicateList getRightOptPredicateList() throws StandardException(Code) | | Retrieve the list of optimizable predicates that are
targeted for the right child. Create a new (empty)
list if the list is null.
|
hasUnPushedPredicates | protected boolean hasUnPushedPredicates()(Code) | | It's possible that we tried to push predicates to this node's
children but failed to do so. This can happen if this node's
children both satisfy the criteria for pushing a predicate
(namely, they reference base tables) but the children's
children do not (see modifyAccessPaths() above for an example
of how that can happen). So this method will walk the chain
of nodes beneath this one and determine if any SetOperatorNode
at any level has predicates that were not successfully pushed
to both of its children (note: this currently only applies
to UnionNodes).
True if any UnionNode (or actually, any SetOperatorNode)in the chain of SetOperatorNodes (starting with this one) hasunpushed predicates; false otherwise. |
init | public void init(Object leftResult, Object rightResult, Object all, Object tableProperties) throws StandardException(Code) | | Initializer for a SetOperatorNode.
Parameters: leftResult - The ResultSetNode on the left side of this union Parameters: rightResult - The ResultSetNode on the right side of this union Parameters: all - Whether or not this is an ALL. Parameters: tableProperties - Properties list associated with the table exception: StandardException - Thrown on error |
performMaterialization | public boolean performMaterialization(JBitSet outerTables) throws StandardException(Code) | | Return whether or not to materialize this ResultSet tree.
Whether or not to materialize this ResultSet tree.would return valid results. exception: StandardException - Thrown on error |
preprocess | public ResultSetNode preprocess(int numTables, GroupByList gbl, FromList fromList) throws StandardException(Code) | | Put a ProjectRestrictNode on top of each FromTable in the FromList.
ColumnReferences must continue to point to the same ResultColumn, so
that ResultColumn must percolate up to the new PRN. However,
that ResultColumn will point to a new expression, a VirtualColumnNode,
which points to the FromTable and the ResultColumn that is the source for
the ColumnReference.
(The new PRN will have the original of the ResultColumnList and
the ResultColumns from that list. The FromTable will get shallow copies
of the ResultColumnList and its ResultColumns. ResultColumn.expression
will remain at the FromTable, with the PRN getting a new
VirtualColumnNode for each ResultColumn.expression.)
We then project out the non-referenced columns. If there are no referenced
columns, then the PRN's ResultColumnList will consist of a single ResultColumn
whose expression is 1.
Parameters: numTables - Number of tables in the DML Statement Parameters: gbl - The group by list, if any Parameters: fromList - The from list, if any The preprocessed ResultSetNode that can be optimized exception: StandardException - Thrown on error |
pushOptPredicate | public boolean pushOptPredicate(OptimizablePredicate optimizablePredicate) throws StandardException(Code) | | See Also: org.apache.derby.iapi.sql.compile.Optimizable.pushOptPredicate See Also: Take a predicate and push it down to both the left AND right result See Also: sets. Return "true" if we successfully pushed it to both sides, See Also: and "false" otherwise. The assumption is that if we return "true", See Also: the caller will take the predicate and remove it from its own list See Also: of predicates to evaluate; if we return false, then the predicate See Also: will be evaluated at the level of the caller. So returning "false" See Also: means that the left and right result sets for this node will be fully See Also: returned, and then the predicate will be evaluated against the See Also: of those result sets (as of DERBY-805, the only set See Also: operator calling this method is UnionNode). If we can push the See Also: predicate down to both children, though, we can evaluate it closer See Also: to store, which means that each child result set returns only the See Also: correctly qualified rows, and thus the calling set operator will See Also: have a smaller result set on which to operate, which can boost See Also: performance. See Also: That said, if we can't push the predicate to _both_ sides, we don't See Also: push it at all. The reason is that if we push to one side but not See Also: to the other, we would have to ask the question of whether we should See Also: return "true" (meaning that the predicate would be removed from the See Also: caller's list and thus would _not_ be evaluated at the See Also: level) or "false" (meaning that the caller would keep the predicate See Also: and evaluate it at the level). Depending on the query See Also: in question, both answers could end up returning incorrect results. See Also: For example, if we push it to the right but not to the left, then See Also: leave it in the caller's list, the optimizer for the caller might See Also: decide to use the predicate to do a hash join with some outer result See Also: set (if the predicate is an equijoin predicate). That would result See Also: in materialization of the calling node and of its children--but since See Also: we pushed a predicate that depends on the outer table down into the See Also: right child, materialization of the right child will only return the See Also: rows that join with the _first_ row of the outer result set, which See Also: is wrong. See Also: If, on the other hand, we push the predicate to one side and then tell See Also: the caller to remove it from its list, the side to which we did _not_ See Also: push the predicate could return rows that aren't qualified. Then, See Also: since the caller removed the predicate from its list, it (the caller) See Also: will not evaluate the predicate on its own result set--and thus we See Also: can end up returning rows that we weren't supposed to return. See Also: So all of that said, only push (and return "true") if we think we See Also: can push the predicate to both sides. exception: StandardException - Thrown on error |
pushOrderByList | void pushOrderByList(OrderByList orderByList)(Code) | | Push the order by list down from the cursor node
into its child result set so that the optimizer
has all of the information that it needs to
consider sort avoidance.
Parameters: orderByList - The order by list |
setParamColumnTypes | void setParamColumnTypes(DataTypeDescriptor[] types, RowResultSetNode rrsn) throws StandardException(Code) | | Set the type of each ? parameter in the given RowResultSetNode
according to its ordinal position in the given array of types.
Parameters: types - An array of types containing the proper type for each? parameter, by ordinal position. Parameters: rrsn - A RowResultSetNode that could contain ? parameters whosetypes need to be set. exception: StandardException - Thrown on error |
setResultToBooleanTrueNode | public void setResultToBooleanTrueNode(boolean onlyConvertAlls) throws StandardException(Code) | | Set the result column for the subquery to a boolean true,
Useful for transformations such as
changing:
where exists (select ... from ...)
to:
where (select true from ...)
NOTE: No transformation is performed if the ResultColumn.expression is
already the correct boolean constant.
Parameters: onlyConvertAlls - Boolean, whether or not to just convert *'s exception: StandardException - Thrown on error |
toString | public String toString()(Code) | | Convert this object to a String. See comments in QueryTreeNode.java
for how this should be done for tree printing.
This object as a String |
verifySelectStarSubquery | public void verifySelectStarSubquery(FromList outerFromList, int subqueryType) throws StandardException(Code) | | Verify that a SELECT * is valid for this type of subquery.
Parameters: outerFromList - The FromList from the outer query block(s) Parameters: subqueryType - The subquery type exception: StandardException - Thrown on error |
Methods inherited from org.apache.derby.impl.sql.compile.TableOperatorNode | public Visitable accept(Visitor v) throws StandardException(Code)(Java Doc) public void bindExpressions(FromList fromListParam) throws StandardException(Code)(Java Doc) public void bindExpressionsWithTables(FromList fromListParam) throws StandardException(Code)(Java Doc) public ResultSetNode bindNonVTITables(DataDictionary dataDictionary, FromList fromListParam) throws StandardException(Code)(Java Doc) public void bindResultColumns(FromList fromListParam) throws StandardException(Code)(Java Doc) public void bindResultColumns(TableDescriptor targetTableDescriptor, FromVTI targetVTI, ResultColumnList targetColumnList, DMLStatementNode statement, FromList fromListParam) throws StandardException(Code)(Java Doc) public ResultSetNode bindVTITables(FromList fromListParam) throws StandardException(Code)(Java Doc) void decrementLevel(int decrement)(Code)(Java Doc) public String getExposedName()(Code)(Java Doc) protected FromTable getFromTableByName(String name, String schemaName, boolean exactMatch) throws StandardException(Code)(Java Doc) public ResultSetNode getLeftResultSet()(Code)(Java Doc) public ResultSetNode getLeftmostResultSet()(Code)(Java Doc) public ResultSetNode getRightResultSet()(Code)(Java Doc) public void init(Object leftResultSet, Object rightResultSet, Object tableProperties) throws StandardException(Code)(Java Doc) void markOrderingDependent()(Code)(Java Doc) public Optimizable modifyAccessPath(JBitSet outerTables) throws StandardException(Code)(Java Doc) public ResultSetNode modifyAccessPaths() throws StandardException(Code)(Java Doc) public boolean needsSpecialRCLBinding()(Code)(Java Doc) public ResultSetNode optimize(DataDictionary dataDictionary, PredicateList predicateList, double outerRows) throws StandardException(Code)(Java Doc) protected ResultSetNode optimizeSource(Optimizer optimizer, ResultSetNode sourceResultSet, PredicateList predList, CostEstimate outerCost) throws StandardException(Code)(Java Doc) public ResultSetNode preprocess(int numTables, GroupByList gbl, FromList fromList) throws StandardException(Code)(Java Doc) public void printSubNodes(int depth)(Code)(Java Doc) void projectResultColumns() throws StandardException(Code)(Java Doc) public boolean referencesSessionSchema() throws StandardException(Code)(Java Doc) public boolean referencesTarget(String name, boolean baseTable) throws StandardException(Code)(Java Doc) public void rejectParameters() throws StandardException(Code)(Java Doc) void replaceDefaults(TableDescriptor ttd, ResultColumnList tcl) throws StandardException(Code)(Java Doc) public void setLeftmostResultSet(ResultSetNode newLeftResultSet)(Code)(Java Doc) public void setLevel(int level)(Code)(Java Doc) public void setNestedInParens(boolean nestedInParens)(Code)(Java Doc) void setReferencedColumns()(Code)(Java Doc) public String toString()(Code)(Java Doc) public void updateBestPlanMap(short action, Object planKey) throws StandardException(Code)(Java Doc) public void verifyProperties(DataDictionary dDictionary) throws StandardException(Code)(Java Doc)
|
Methods inherited from org.apache.derby.impl.sql.compile.FromTable | public boolean LOJ_reorderable(int numTables) throws StandardException(Code)(Java Doc) protected void assignCostEstimate(CostEstimate newCostEstimate)(Code)(Java Doc) protected boolean canBeOrdered()(Code)(Java Doc) public boolean considerSortAvoidancePath()(Code)(Java Doc) public int convertAbsoluteToRelativeColumnPosition(int absolutePosition)(Code)(Java Doc) protected boolean cursorTargetTable()(Code)(Java Doc) void decrementLevel(int decrement)(Code)(Java Doc) public CostEstimate estimateCost(OptimizablePredicateList predList, ConglomerateDescriptor cd, CostEstimate outerCost, Optimizer optimizer, RowOrdering rowOrdering) throws StandardException(Code)(Java Doc) public boolean feasibleJoinStrategy(OptimizablePredicateList predList, Optimizer optimizer) throws StandardException(Code)(Java Doc) public void fillInReferencedTableMap(JBitSet passedMap)(Code)(Java Doc) public FromList flatten(ResultColumnList rcl, PredicateList outerPList, SubqueryList sql, GroupByList gbl) throws StandardException(Code)(Java Doc) public boolean forUpdate()(Code)(Java Doc) public String getBaseTableName()(Code)(Java Doc) public AccessPath getBestAccessPath()(Code)(Java Doc) public AccessPath getBestSortAvoidancePath()(Code)(Java Doc) public String getCorrelationName()(Code)(Java Doc) protected CostEstimate getCostEstimate(Optimizer optimizer)(Code)(Java Doc) public AccessPath getCurrentAccessPath()(Code)(Java Doc) public String getExposedName() throws StandardException(Code)(Java Doc) public CostEstimate getFinalCostEstimate() throws StandardException(Code)(Java Doc) protected FromTable getFromTableByName(String name, String schemaName, boolean exactMatch) throws StandardException(Code)(Java Doc) public int getLevel()(Code)(Java Doc) public String getName() throws StandardException(Code)(Java Doc) public int getNumColumnsReturned()(Code)(Java Doc) public TableName getOrigTableName()(Code)(Java Doc) public Properties getProperties()(Code)(Java Doc) public ResultColumnList getResultColumnsForList(TableName allTableName, ResultColumnList inputRcl, TableName tableName) throws StandardException(Code)(Java Doc) public SchemaDescriptor getSchemaDescriptor() throws StandardException(Code)(Java Doc) public SchemaDescriptor getSchemaDescriptor(TableName tableName) throws StandardException(Code)(Java Doc) protected CostEstimate getScratchCostEstimate(Optimizer optimizer)(Code)(Java Doc) public TableDescriptor getTableDescriptor()(Code)(Java Doc) public TableName getTableName() throws StandardException(Code)(Java Doc) public int getTableNumber()(Code)(Java Doc) public AccessPath getTrulyTheBestAccessPath()(Code)(Java Doc) String getUserSpecifiedJoinStrategy()(Code)(Java Doc) public boolean hasTableNumber()(Code)(Java Doc) public int[] hashKeyColumns()(Code)(Java Doc) public void init(Object correlationName, Object tableProperties)(Code)(Java Doc) public void initAccessPaths(Optimizer optimizer)(Code)(Java Doc) public int initialCapacity()(Code)(Java Doc) public boolean isBaseTable()(Code)(Java Doc) public boolean isCoveringIndex(ConglomerateDescriptor cd) throws StandardException(Code)(Java Doc) public boolean isFlattenableJoinNode()(Code)(Java Doc) public boolean isMaterializable() throws StandardException(Code)(Java Doc) public boolean isOneRowScan() throws StandardException(Code)(Java Doc) public boolean isTargetTable()(Code)(Java Doc) public boolean legalJoinOrder(JBitSet assignedTableMap)(Code)(Java Doc) public float loadFactor()(Code)(Java Doc) protected void markUpdatableByCursor(Vector updateColumns)(Code)(Java Doc) public int maxCapacity(JoinStrategy joinStrategy, int maxMemoryPerTable) throws StandardException(Code)(Java Doc) public boolean memoryUsageOK(double rowCount, int maxMemoryPerTable) throws StandardException(Code)(Java Doc) public Optimizable modifyAccessPath(JBitSet outerTables) throws StandardException(Code)(Java Doc) public boolean needsSpecialRCLBinding()(Code)(Java Doc) public boolean nextAccessPath(Optimizer optimizer, OptimizablePredicateList predList, RowOrdering rowOrdering) throws StandardException(Code)(Java Doc) public CostEstimate optimizeIt(Optimizer optimizer, OptimizablePredicateList predList, CostEstimate outerCost, RowOrdering rowOrdering) throws StandardException(Code)(Java Doc) void optimizeSubqueries(DataDictionary dd, double rowCount) throws StandardException(Code)(Java Doc) public void pullOptPredicates(OptimizablePredicateList optimizablePredicates) throws StandardException(Code)(Java Doc) void pushExpressions(PredicateList predicateList) throws StandardException(Code)(Java Doc) public boolean pushOptPredicate(OptimizablePredicate optimizablePredicate) throws StandardException(Code)(Java Doc) public void rememberAsBest(int planType, Optimizer optimizer) throws StandardException(Code)(Java Doc) public void rememberJoinStrategyAsBest(AccessPath ap)(Code)(Java Doc) public void rememberSortAvoidancePath()(Code)(Java Doc) protected void resetJoinStrategies(Optimizer optimizer)(Code)(Java Doc) protected void setCostEstimate(CostEstimate newCostEstimate)(Code)(Java Doc) public void setHashKeyColumns(int[] columnNumbers)(Code)(Java Doc) public void setLevel(int level)(Code)(Java Doc) public void setOrigTableName(TableName tableName)(Code)(Java Doc) public void setProperties(Properties tableProperties)(Code)(Java Doc) public void setTableNumber(int tableNumber)(Code)(Java Doc) public void startOptimizing(Optimizer optimizer, RowOrdering rowOrdering)(Code)(Java Doc) public boolean supportsMultipleInstantiations()(Code)(Java Doc) protected void tellRowOrderingAboutConstantColumns(RowOrdering rowOrdering, OptimizablePredicateList predList)(Code)(Java Doc) public String toString()(Code)(Java Doc) public FromTable transformOuterJoins(ValueNode predicateTree, int numTables) throws StandardException(Code)(Java Doc) public double uniqueJoin(OptimizablePredicateList predList) throws StandardException(Code)(Java Doc) public void updateBestPlanMap(short action, Object planKey) throws StandardException(Code)(Java Doc) public void verifyProperties(DataDictionary dDictionary) throws StandardException(Code)(Java Doc)
|
Methods inherited from org.apache.derby.impl.sql.compile.ResultSetNode | public JBitSet LOJgetReferencedTables(int numTables) throws StandardException(Code)(Java Doc) public Visitable accept(Visitor v) throws StandardException(Code)(Java Doc) public ResultSetNode addNewPredicate(Predicate predicate) throws StandardException(Code)(Java Doc) public void assignResultSetNumber() throws StandardException(Code)(Java Doc) public void bindExpressions(FromList fromListParam) throws StandardException(Code)(Java Doc) public void bindExpressionsWithTables(FromList fromListParam) throws StandardException(Code)(Java Doc) public ResultSetNode bindNonVTITables(DataDictionary dataDictionary, FromList fromListParam) throws StandardException(Code)(Java Doc) public void bindResultColumns(FromList fromListParam) throws StandardException(Code)(Java Doc) public void bindResultColumns(TableDescriptor targetTableDescriptor, FromVTI targetVTI, ResultColumnList targetColumnList, DMLStatementNode statement, FromList fromListParam) throws StandardException(Code)(Java Doc) public void bindTargetExpressions(FromList fromListParam) throws StandardException(Code)(Java Doc) public void bindUntypedNullsToResultColumns(ResultColumnList rcl) throws StandardException(Code)(Java Doc) public ResultSetNode bindVTITables(FromList fromListParam) throws StandardException(Code)(Java Doc) public ResultSetNode changeAccessPath() throws StandardException(Code)(Java Doc) boolean columnTypesAndLengthsMatch() throws StandardException(Code)(Java Doc) public ResultSetNode considerMaterialization(JBitSet outerTables) throws StandardException(Code)(Java Doc) abstract void decrementLevel(int decrement)(Code)(Java Doc) public void disablePrivilegeCollection()(Code)(Java Doc) public ResultSetNode enhanceRCLForInsert(int numTargetColumns, int[] colMap, DataDictionary dataDictionary, TableDescriptor targetTD, FromVTI targetVTI) throws StandardException(Code)(Java Doc) public ResultSetNode ensurePredicateList(int numTables) throws StandardException(Code)(Java Doc) public void fillInReferencedTableMap(JBitSet passedMap)(Code)(Java Doc) public boolean flattenableInFromSubquery(FromList fromList)(Code)(Java Doc) ResultColumn genNewRCForInsert(TableDescriptor targetTD, FromVTI targetVTI, int columnNumber, DataDictionary dataDictionary) throws StandardException(Code)(Java Doc) public NormalizeResultSetNode genNormalizeResultSetNode(ResultSetNode normalizeChild, boolean forUpdate) throws StandardException(Code)(Java Doc) public ResultSetNode genProjectRestrict() throws StandardException(Code)(Java Doc) protected ResultSetNode genProjectRestrict(int numTables) throws StandardException(Code)(Java Doc) ResultSetNode genProjectRestrictForReordering() throws StandardException(Code)(Java Doc) public void generateNormalizationResultSet(ActivationClassBuilder acb, MethodBuilder mb, int resultSetNumber, ResultDescription resultDescription) throws StandardException(Code)(Java Doc) public void generateResultSet(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException(Code)(Java Doc) public ResultColumnList getAllResultColumns(TableName allTableName) throws StandardException(Code)(Java Doc) public CostEstimate getCostEstimate()(Code)(Java Doc) FromTable getCursorTargetTable()(Code)(Java Doc) public CostEstimate getFinalCostEstimate() throws StandardException(Code)(Java Doc) public FromList getFromList() throws StandardException(Code)(Java Doc) protected FromTable getFromTableByName(String name, String schemaName, boolean exactMatch) throws StandardException(Code)(Java Doc) public ResultColumn getMatchingColumn(ColumnReference columnReference) throws StandardException(Code)(Java Doc) protected CostEstimate getNewCostEstimate() throws StandardException(Code)(Java Doc) protected Optimizer getOptimizer(OptimizableList optList, OptimizablePredicateList predList, DataDictionary dataDictionary, RequiredRowOrdering requiredRowOrdering) throws StandardException(Code)(Java Doc) protected OptimizerImpl getOptimizerImpl()(Code)(Java Doc) public JBitSet getReferencedTableMap()(Code)(Java Doc) public ResultColumnList getResultColumns()(Code)(Java Doc) public int getResultSetNumber()(Code)(Java Doc) public boolean isNotExists()(Code)(Java Doc) public boolean isOneRowResultSet() throws StandardException(Code)(Java Doc) boolean isOrderedOn(ColumnReference[] crs, boolean permuteOrdering, Vector fbtVector) throws StandardException(Code)(Java Doc) boolean isPossibleDistinctScan(Set distinctColumns)(Code)(Java Doc) boolean isUpdatableCursor(DataDictionary dd) throws StandardException(Code)(Java Doc) public ResultDescription makeResultDescription()(Code)(Java Doc) ResultColumnDescriptor[] makeResultDescriptors(ExecutionContext ec)(Code)(Java Doc) public boolean markAsCursorTargetTable()(Code)(Java Doc) void markForDistinctScan()(Code)(Java Doc) void markOrderingDependent()(Code)(Java Doc) public void markStatementResultSet()(Code)(Java Doc) public ResultSetNode modifyAccessPaths() throws StandardException(Code)(Java Doc) public ResultSetNode modifyAccessPaths(PredicateList predList) throws StandardException(Code)(Java Doc) void notCursorTargetTable()(Code)(Java Doc) void notFlattenableJoin()(Code)(Java Doc) final protected static int numDistinctAggregates(Vector aggregateVector)(Code)(Java Doc) public ResultSetNode optimize(DataDictionary dataDictionary, PredicateList predicates, double outerRows) throws StandardException(Code)(Java Doc) public ValueNode parseDefault(String defaultText) throws StandardException(Code)(Java Doc) public boolean performMaterialization(JBitSet outerTables) throws StandardException(Code)(Java Doc) public ResultSetNode preprocess(int numTables, GroupByList gbl, FromList fromList) throws StandardException(Code)(Java Doc) public void printSubNodes(int depth)(Code)(Java Doc) void projectResultColumns() throws StandardException(Code)(Java Doc) void pushOrderByList(OrderByList orderByList)(Code)(Java Doc) public boolean referencesTarget(String name, boolean baseTable) throws StandardException(Code)(Java Doc) public void rejectParameters() throws StandardException(Code)(Java Doc) public void rejectXMLValues() throws StandardException(Code)(Java Doc) public void renameGeneratedResultNames() throws StandardException(Code)(Java Doc) void replaceDefaults(TableDescriptor ttd, ResultColumnList tcl) throws StandardException(Code)(Java Doc) boolean returnsAtMostOneRow()(Code)(Java Doc) public void setInsertSource()(Code)(Java Doc) public void setReferencedTableMap(JBitSet newRTM)(Code)(Java Doc) public void setResultColumns(ResultColumnList newRCL)(Code)(Java Doc) public void setResultToBooleanTrueNode(boolean onlyConvertAlls) throws StandardException(Code)(Java Doc) void setTableConstructorTypes(ResultColumnList typeColumns) throws StandardException(Code)(Java Doc) boolean subqueryReferencesTarget(String name, boolean baseTable) throws StandardException(Code)(Java Doc) public String toString()(Code)(Java Doc) public int updateTargetLockMode()(Code)(Java Doc) public void verifySelectStarSubquery(FromList outerFromList, int subqueryType) throws StandardException(Code)(Java Doc)
|
Methods inherited from org.apache.derby.impl.sql.compile.QueryTreeNode | public Visitable accept(Visitor v) throws StandardException(Code)(Java Doc) public QueryTreeNode bind() throws StandardException(Code)(Java Doc) public DataValueDescriptor convertDefaultNode(DataTypeDescriptor typeDescriptor) throws StandardException(Code)(Java Doc) protected static void debugFlush()(Code)(Java Doc) public static void debugPrint(String outputString)(Code)(Java Doc) public void disablePrivilegeCollection()(Code)(Java Doc) public String executeSchemaName()(Code)(Java Doc) public String executeStatementName()(Code)(Java Doc) public static String formatNodeString(String nodeString, int depth)(Code)(Java Doc) public boolean foundString(String[] list, String search)(Code)(Java Doc) public GeneratedClass generate(ByteArray ignored) throws StandardException(Code)(Java Doc) protected void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException(Code)(Java Doc) void generateAuthorizeCheck(ActivationClassBuilder acb, MethodBuilder mb, int sqlOperation)(Code)(Java Doc) public int getBeginOffset()(Code)(Java Doc) final protected ClassFactory getClassFactory()(Code)(Java Doc) final protected CompilerContext getCompilerContext()(Code)(Java Doc) final public ContextManager getContextManager()(Code)(Java Doc) public Object getCursorInfo() throws StandardException(Code)(Java Doc) final public DataDictionary getDataDictionary()(Code)(Java Doc) final public DependencyManager getDependencyManager()(Code)(Java Doc) public int getEndOffset()(Code)(Java Doc) final public ExecutionFactory getExecutionFactory()(Code)(Java Doc) final public GenericConstantActionFactory getGenericConstantActionFactory()(Code)(Java Doc) protected int getIntProperty(String value, String key) throws StandardException(Code)(Java Doc) final protected LanguageConnectionContext getLanguageConnectionContext()(Code)(Java Doc) final public NodeFactory getNodeFactory()(Code)(Java Doc) protected int getNodeType()(Code)(Java Doc) public ConstantNode getNullNode(TypeId typeId, ContextManager cm) throws StandardException(Code)(Java Doc) public DataTypeDescriptor[] getParameterTypes() throws StandardException(Code)(Java Doc) public long getRowEstimate()(Code)(Java Doc) public String getSPSName()(Code)(Java Doc) final SchemaDescriptor getSchemaDescriptor(String schemaName) throws StandardException(Code)(Java Doc) final SchemaDescriptor getSchemaDescriptor(String schemaName, boolean raiseError) throws StandardException(Code)(Java Doc) protected int getStatementType()(Code)(Java Doc) final protected TableDescriptor getTableDescriptor(String tableName, SchemaDescriptor schema) throws StandardException(Code)(Java Doc) final protected TypeCompiler getTypeCompiler(TypeId typeId)(Code)(Java Doc) public void init(Object arg1) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13, Object arg14) throws StandardException(Code)(Java Doc) public boolean isAtomic() throws StandardException(Code)(Java Doc) protected boolean isInstanceOf(int nodeType)(Code)(Java Doc) public boolean isPrivilegeCollectionRequired()(Code)(Java Doc) final boolean isSessionSchema(SchemaDescriptor sd)(Code)(Java Doc) final boolean isSessionSchema(String schemaName)(Code)(Java Doc) public ConstantAction makeConstantAction() throws StandardException(Code)(Java Doc) public ResultDescription makeResultDescription() throws StandardException(Code)(Java Doc) public TableName makeTableName(String schemaName, String flatName) throws StandardException(Code)(Java Doc) public boolean needsSavepoint()(Code)(Java Doc) protected String nodeHeader()(Code)(Java Doc) public QueryTreeNode optimize() throws StandardException(Code)(Java Doc) public static QueryTreeNode parseQueryText(CompilerContext compilerContext, String queryText, Object[] paramDefaults, LanguageConnectionContext lcc) throws StandardException(Code)(Java Doc) public void printLabel(int depth, String label)(Code)(Java Doc) public void printSubNodes(int depth)(Code)(Java Doc) public boolean referencesSessionSchema() throws StandardException(Code)(Java Doc) public TableName resolveTableToSynonym(TableName tabName) throws StandardException(Code)(Java Doc) public void setBeginOffset(int beginOffset)(Code)(Java Doc) public void setContextManager(ContextManager cm)(Code)(Java Doc) public void setEndOffset(int endOffset)(Code)(Java Doc) public void setNodeType(int nodeType)(Code)(Java Doc) public void setRefActionInfo(long fkIndexConglomId, int[] fkColArray, String parentResultSetId, boolean dependentScan)(Code)(Java Doc) public String toString()(Code)(Java Doc) public void treePrint()(Code)(Java Doc) public void treePrint(int depth)(Code)(Java Doc) String verifyClassExist(String javaClassName, boolean convertCase) throws StandardException(Code)(Java Doc)
|
|
|