|
|||||||||
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
public class 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 | |
---|---|
private FormatableBitSet |
allReferencedCols
|
protected ConglomerateDescriptor |
baseCD
|
protected boolean |
cursorTargetTable
|
protected boolean |
forUpdate
|
private FormatableBitSet |
heapOnlyReferencedCols
|
private FormatableBitSet |
heapReferencedCols
|
private FormatableBitSet |
indexReferencedCols
|
protected PredicateList |
restrictionList
|
protected FromBaseTable |
source
|
Fields inherited from class org.apache.derby.impl.sql.compile.FromTable |
---|
ADD_PLAN, bestAccessPath, bestCostEstimate, bestSortAvoidancePath, correlationName, corrTableName, currentAccessPath, hashKeyColumns, initialCapacity, level, LOAD_PLAN, loadFactor, maxCapacity, origTableName, REMOVE_PLAN, tableNumber, tableProperties, trulyTheBestAccessPath, userSpecifiedJoinStrategy |
Fields inherited from class org.apache.derby.impl.sql.compile.ResultSetNode |
---|
costEstimate, finalCostEstimate, insertSource, optimizer, referencedTableMap, resultColumns, resultSetNumber, scratchCostEstimate, statementResultSet |
Fields inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode |
---|
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, isPrivilegeCollectionRequired |
Constructor Summary | |
---|---|
IndexToBaseRowNode()
|
Method Summary | |
---|---|
(package private) void |
acceptChildren(Visitor v)
Accept the visitor for all visitable children of this node. |
(package private) void |
adjustForSortElimination()
Notify the underlying result set tree that the optimizer has chosen to "eliminate" a sort. |
(package private) void |
adjustForSortElimination(RequiredRowOrdering rowOrdering)
Same goal as adjustForSortElimination above, but this version takes a RequiredRowOrdering to allow nodes to adjust based on the ORDER BY clause, if needed. |
(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 FromTable. |
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. |
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
private FormatableBitSet allReferencedCols
private FormatableBitSet heapOnlyReferencedCols
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()
FromTable
getFinalCostEstimate
in class FromTable
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 adjustForSortElimination()
ResultSetNode
adjustForSortElimination
in class ResultSetNode
ResultSetNode.adjustForSortElimination()
void adjustForSortElimination(RequiredRowOrdering rowOrdering) throws StandardException
ResultSetNode
adjustForSortElimination
in class ResultSetNode
StandardException
ResultSetNode.adjustForSortElimination()
private int[] getIndexColMapping()
void acceptChildren(Visitor v) throws StandardException
acceptChildren
in class ResultSetNode
v
- the visitor
StandardException
- on error
|
Built on Thu 2011-03-10 11:54:14+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |