|
||||||||||
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.RowResultSetNode
A RowResultSetNode represents the result set for a VALUES clause.
Field Summary | |
(package private) java.util.Vector |
aggregateVector
|
(package private) OrderByList |
orderByList
|
(package private) SubqueryList |
subquerys
|
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 | |
RowResultSetNode()
|
Method Summary | |
ResultSetNode |
addNewPredicate(Predicate predicate)
Add a new predicate to the list. |
void |
bindExpressions(FromList fromListParam)
Bind the expressions in this RowResultSetNode. |
void |
bindExpressionsWithTables(FromList fromListParam)
Bind the expressions in this ResultSetNode if it has tables. |
ResultSetNode |
bindNonVTITables(DataDictionary dataDictionary,
FromList fromListParam)
Bind the non VTI tables in this ResultSetNode. |
void |
bindTargetExpressions(FromList fromListParam)
Bind the expressions in the target list. |
void |
bindUntypedNullsToResultColumns(ResultColumnList bindingRCL)
Bind any untyped null nodes to the types in the given ResultColumnList. |
private boolean |
canWeCacheResults()
|
ResultSetNode |
ensurePredicateList(int numTables)
Ensure that the top of the RSN tree has a PredicateList. |
CostEstimate |
estimateCost(OptimizablePredicateList predList,
ConglomerateDescriptor cd,
CostEstimate outerCost,
Optimizer optimizer,
RowOrdering rowOrdering)
Estimate the cost of scanning this Optimizable using the given predicate list with the given conglomerate. |
boolean |
flattenableInFromSubquery(FromList fromList)
Evaluate whether or not the subquery in a FromSubquery is flattenable. |
void |
generate(ActivationClassBuilder acb,
MethodBuilder mb)
The generated ResultSet will be: RowResultSet -- for the VALUES clause |
java.lang.String |
getExposedName()
Get the exposed name for this table, which is the name that can be used to refer to it in the rest of the query. |
ResultColumn |
getMatchingColumn(ColumnReference columnReference)
Try to find a ResultColumn in the table represented by this FromTable that matches the name in the given ColumnReference. |
void |
init(java.lang.Object valuesClause,
java.lang.Object tableProperties)
Initializer for a RowResultSetNode. |
(package private) void |
markOrderingDependent()
Notify the underlying result set tree that the result is ordering dependent. |
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. |
ResultSetNode |
optimize(DataDictionary dataDictionary,
PredicateList predicateList,
double outerRows)
Optimize this SelectNode. |
(package private) void |
optimizeSubqueries(DataDictionary dd,
double rowCount)
Optimize any subqueries that haven't been optimized any where else. |
ResultSetNode |
preprocess(int numTables,
GroupByList gbl,
FromList fromList)
Put a ProjectRestrictNode on top of each FromTable in the FromList. |
void |
printSubNodes(int depth)
Prints the sub-nodes of this object. |
(package private) 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. |
(package private) void |
replaceDefaults(TableDescriptor ttd,
ResultColumnList tcl)
Replace any DEFAULTs with the associated tree for the default. |
(package private) boolean |
returnsAtMostOneRow()
Return whether or not this ResultSet tree is guaranteed to return at most 1 row based on heuristics. |
java.lang.String |
statementToString()
|
java.lang.String |
toString()
Convert this object to a String. |
void |
verifySelectStarSubquery(FromList outerFromList,
int subqueryType)
Verify that a SELECT * is valid for this type of subquery. |
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 |
SubqueryList subquerys
java.util.Vector aggregateVector
OrderByList orderByList
Constructor Detail |
public RowResultSetNode()
Method Detail |
public void init(java.lang.Object valuesClause, java.lang.Object tableProperties)
init
in class FromTable
valuesClause
- The result column list for the VALUES clause.tableProperties
- Properties list associated with the tablepublic java.lang.String toString()
toString
in class FromTable
public java.lang.String statementToString()
public void printSubNodes(int depth)
printSubNodes
in class ResultSetNode
depth
- The depth of this node in the tree
public CostEstimate estimateCost(OptimizablePredicateList predList, ConglomerateDescriptor cd, CostEstimate outerCost, Optimizer optimizer, RowOrdering rowOrdering) throws StandardException
Optimizable
estimateCost
in interface Optimizable
estimateCost
in class FromTable
StandardException
- Thrown on errorOptimizable.estimateCost(org.apache.derby.iapi.sql.compile.OptimizablePredicateList, org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor, org.apache.derby.iapi.sql.compile.CostEstimate, org.apache.derby.iapi.sql.compile.Optimizer, org.apache.derby.iapi.sql.compile.RowOrdering)
public ResultSetNode bindNonVTITables(DataDictionary dataDictionary, FromList fromListParam) throws StandardException
bindNonVTITables
in class ResultSetNode
dataDictionary
- The DataDictionary to use for bindingfromListParam
- FromList to use/append to.
StandardException
- Thrown on errorpublic void bindExpressions(FromList fromListParam) throws StandardException
bindExpressions
in class ResultSetNode
fromListParam
- FromList to use/append to.
StandardException
- Thrown on errorpublic void bindExpressionsWithTables(FromList fromListParam) throws StandardException
bindExpressionsWithTables
in class ResultSetNode
fromListParam
- FromList to use/append to.
StandardException
- Thrown on errorpublic void bindTargetExpressions(FromList fromListParam) throws StandardException
bindTargetExpressions
in class ResultSetNode
StandardException
- Thrown on errorpublic void bindUntypedNullsToResultColumns(ResultColumnList bindingRCL) throws StandardException
bindUntypedNullsToResultColumns
in class ResultSetNode
bindingRCL
- The ResultColumnList with the types to bind to.
StandardException
- Thrown on errorpublic ResultColumn getMatchingColumn(ColumnReference columnReference) throws StandardException
getMatchingColumn
in class ResultSetNode
columnReference
- The columnReference whose name we're looking
for in the given table.
StandardException
- Thrown on errorpublic java.lang.String getExposedName() throws StandardException
getExposedName
in class FromTable
StandardException
- Thrown on errorpublic void verifySelectStarSubquery(FromList outerFromList, int subqueryType) throws StandardException
verifySelectStarSubquery
in class ResultSetNode
outerFromList
- The FromList from the outer query block(s)subqueryType
- The subquery type
StandardException
- Thrown on errorvoid pushOrderByList(OrderByList orderByList)
pushOrderByList
in class ResultSetNode
orderByList
- The order by list
public ResultSetNode preprocess(int numTables, GroupByList gbl, FromList fromList) throws StandardException
preprocess
in class ResultSetNode
numTables
- Number of tables in the DML Statementgbl
- The group by list, if anyfromList
- The from list, if any
StandardException
- Thrown on errorpublic ResultSetNode ensurePredicateList(int numTables) throws StandardException
ensurePredicateList
in class ResultSetNode
numTables
- The number of tables in the query.
StandardException
- Thrown on errorpublic ResultSetNode addNewPredicate(Predicate predicate) throws StandardException
addNewPredicate
in class ResultSetNode
predicate
- The predicate to add
StandardException
- Thrown on errorpublic boolean flattenableInFromSubquery(FromList fromList)
flattenableInFromSubquery
in class ResultSetNode
fromList
- The outer from list
public ResultSetNode optimize(DataDictionary dataDictionary, PredicateList predicateList, double outerRows) throws StandardException
optimize
in class ResultSetNode
dataDictionary
- The DataDictionary to use for optimizationpredicateList
- The predicate list to optimize againstouterRows
- The number of outer joining rows
StandardException
- Thrown on errorpublic Optimizable modifyAccessPath(JBitSet outerTables) throws StandardException
Optimizable
modifyAccessPath
in interface Optimizable
modifyAccessPath
in class FromTable
StandardException
- Thrown on errorOptimizable.modifyAccessPath(org.apache.derby.iapi.util.JBitSet)
public ResultSetNode modifyAccessPaths() throws StandardException
ResultSetNode
modifyAccessPaths
in class ResultSetNode
StandardException
- Thrown on errorResultSetNode.modifyAccessPaths()
boolean returnsAtMostOneRow()
returnsAtMostOneRow
in class ResultSetNode
public 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 errorvoid replaceDefaults(TableDescriptor ttd, ResultColumnList tcl) throws StandardException
replaceDefaults
in class ResultSetNode
ttd
- The TableDescriptor for the target table.tcl
- The RCL for the target table.
StandardException
- Thrown on errorvoid optimizeSubqueries(DataDictionary dd, double rowCount) throws StandardException
optimizeSubqueries
in class FromTable
StandardException
- Thrown on errorvoid markOrderingDependent()
markOrderingDependent
in class ResultSetNode
private boolean canWeCacheResults() throws StandardException
StandardException
|
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 |