|
||||||||||
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.IndexToBaseRowNode
This node type translates an index row to a base row. It takes a FromBaseTable as its source ResultSetNode, and generates an IndexRowToBaseRowResultSet that takes a TableScanResultSet on an index conglomerate as its source.
Field Summary | |
protected ConglomerateDescriptor |
baseCD
|
protected boolean |
cursorTargetTable
|
protected boolean |
forUpdate
|
private FormatableBitSet |
heapReferencedCols
|
private FormatableBitSet |
indexReferencedCols
|
protected PredicateList |
restrictionList
|
protected FromBaseTable |
source
|
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, 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 | |
IndexToBaseRowNode()
|
Method Summary | |
(package private) void |
decrementLevel(int decrement)
Decrement (query block) level (0-based) for this FromTable. |
boolean |
forUpdate()
Return true if this is the target table of an update |
void |
generate(ActivationClassBuilder acb,
MethodBuilder mb)
Generation of an IndexToBaseRowNode creates an IndexRowToBaseRowResultSet, which uses the RowLocation in the last column of an index row to get the row from the base conglomerate (heap). |
CostEstimate |
getCostEstimate()
Get the CostEstimate for this ResultSetNode. |
CostEstimate |
getFinalCostEstimate()
Get the final CostEstimate for this ResultSetNode. |
private int[] |
getIndexColMapping()
Fill in the column mapping for those columns coming from the index. |
AccessPath |
getTrulyTheBestAccessPath()
Get the best access path overall for this Optimizable. |
void |
init(java.lang.Object source,
java.lang.Object baseCD,
java.lang.Object resultColumns,
java.lang.Object cursorTargetTable,
java.lang.Object heapReferencedCols,
java.lang.Object indexReferencedCols,
java.lang.Object restrictionList,
java.lang.Object forUpdate,
java.lang.Object tableProperties)
Initialize a query tree node. |
boolean |
isNotExists()
Return whether or not the underlying FBT is for NOT EXISTS. |
boolean |
isOneRowResultSet()
Return whether or not the underlying ResultSet tree will return a single row, at most. |
(package private) boolean |
isOrderedOn(ColumnReference[] crs,
boolean permuteOrdering,
java.util.Vector fbtVector)
Return whether or not the underlying ResultSet tree is ordered on the specified columns. |
(package private) void |
markOrderingDependent()
Notify the underlying result set tree that the result is ordering dependent. |
int |
updateTargetLockMode()
Get the lock mode for the target of an update statement (a delete or update). |
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 |
protected FromBaseTable source
protected ConglomerateDescriptor baseCD
protected boolean cursorTargetTable
protected PredicateList restrictionList
protected boolean forUpdate
private FormatableBitSet heapReferencedCols
private FormatableBitSet indexReferencedCols
Constructor Detail |
public IndexToBaseRowNode()
Method Detail |
public void init(java.lang.Object source, java.lang.Object baseCD, java.lang.Object resultColumns, java.lang.Object cursorTargetTable, java.lang.Object heapReferencedCols, java.lang.Object indexReferencedCols, java.lang.Object restrictionList, java.lang.Object forUpdate, java.lang.Object tableProperties)
QueryTreeNode
init
in class QueryTreeNode
public boolean forUpdate()
Optimizable
forUpdate
in interface Optimizable
forUpdate
in class FromTable
Optimizable.forUpdate()
public AccessPath getTrulyTheBestAccessPath()
Optimizable
getTrulyTheBestAccessPath
in interface Optimizable
getTrulyTheBestAccessPath
in class FromTable
Optimizable.getTrulyTheBestAccessPath()
public CostEstimate getCostEstimate()
ResultSetNode
getCostEstimate
in class ResultSetNode
public CostEstimate getFinalCostEstimate()
ResultSetNode
getFinalCostEstimate
in class ResultSetNode
boolean isOrderedOn(ColumnReference[] crs, boolean permuteOrdering, java.util.Vector fbtVector) throws StandardException
isOrderedOn
in class ResultSetNode
crs
- The specified ColumnReference[]permuteOrdering
- Whether or not the order of the CRs in the array can be permutedfbtVector
- Vector that is to be filled with the FromBaseTable
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 method to be built
StandardException
- Thrown on errorpublic boolean isOneRowResultSet() throws StandardException
isOneRowResultSet
in class ResultSetNode
StandardException
- Thrown on errorpublic boolean isNotExists()
isNotExists
in class ResultSetNode
void decrementLevel(int decrement)
decrementLevel
in class FromTable
decrement
- The amount to decrement by.public int updateTargetLockMode()
updateTargetLockMode
in class ResultSetNode
TransactionController
void markOrderingDependent()
markOrderingDependent
in class ResultSetNode
private int[] getIndexColMapping()
|
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 |