public class IndexToBaseRowNode extends FromTable
Modifier and Type | Field and Description |
---|---|
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 |
ADD_PLAN, bestAccessPath, bestCostEstimate, bestSortAvoidancePath, correlationName, corrTableName, currentAccessPath, hashKeyColumns, initialCapacity, level, LOAD_PLAN, loadFactor, maxCapacity, origTableName, REMOVE_PLAN, tableNumber, tableProperties, trulyTheBestAccessPath, userSpecifiedJoinStrategy
costEstimate, finalCostEstimate, insertSource, optimizer, referencedTableMap, resultColumns, resultSetNumber, scratchCostEstimate, statementResultSet
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX
Constructor and Description |
---|
IndexToBaseRowNode() |
Modifier and Type | Method and Description |
---|---|
(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.List 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).
|
assignCostEstimate, canBeOrdered, considerSortAvoidancePath, convertAbsoluteToRelativeColumnPosition, cursorTargetTable, estimateCost, feasibleJoinStrategy, fillInReferencedTableMap, flatten, getBaseTableName, getBestAccessPath, getBestSortAvoidancePath, getCorrelationName, getCostEstimate, getCurrentAccessPath, getExposedName, getFromTableByName, getLevel, getName, getNumColumnsReturned, getOrigTableName, getProperties, getResultColumnsForList, getSchemaDescriptor, getSchemaDescriptor, getScratchCostEstimate, getTableDescriptor, getTableName, getTableNumber, getUserSpecifiedJoinStrategy, hashKeyColumns, hasLargeObjectColumns, hasTableNumber, init, initAccessPaths, initialCapacity, isBaseTable, isCoveringIndex, isFlattenableJoinNode, isJoinColumnForRightOuterJoin, isMaterializable, isOneRowScan, isTargetTable, legalJoinOrder, loadFactor, LOJ_reorderable, markUpdatableByCursor, maxCapacity, memoryUsageOK, modifyAccessPath, needsSpecialRCLBinding, nextAccessPath, optimizeIt, optimizeSubqueries, pullOptPredicates, pushExpressions, pushOptPredicate, rememberAsBest, rememberJoinStrategyAsBest, rememberSortAvoidancePath, resetJoinStrategies, setCostEstimate, setHashKeyColumns, setLevel, setOrigTableName, setProperties, setTableNumber, startOptimizing, supportsMultipleInstantiations, tellRowOrderingAboutConstantColumns, toString, transformOuterJoins, uniqueJoin, updateBestPlanMap, verifyProperties
addNewPredicate, assignResultSetNumber, bindExpressions, bindExpressionsWithTables, bindNonVTITables, bindResultColumns, bindResultColumns, bindTargetExpressions, bindUntypedNullsToResultColumns, bindVTITables, changeAccessPath, columnTypesAndLengthsMatch, considerMaterialization, enhanceRCLForInsert, ensurePredicateList, flattenableInFromSubquery, generateNormalizationResultSet, generateResultSet, genProjectRestrict, genProjectRestrict, genProjectRestrictForReordering, getAllResultColumns, getCursorTargetTable, getFromList, getMatchingColumn, getNewCostEstimate, getOptimizer, getOptimizerImpl, getRCLForInsert, getReferencedTableMap, getResultColumns, getResultSetNumber, isPossibleDistinctScan, isUpdatableCursor, LOJgetReferencedTables, makeResultDescription, makeResultDescriptors, markAsCursorTargetTable, markForDistinctScan, markStatementResultSet, modifyAccessPaths, modifyAccessPaths, notCursorTargetTable, notFlattenableJoin, numDistinctAggregates, optimize, parseDefault, performMaterialization, preprocess, printSubNodes, projectResultColumns, pushOffsetFetchFirst, pushOrderByList, referencesTarget, rejectParameters, rejectXMLValues, renameGeneratedResultNames, replaceOrForbidDefaults, returnsAtMostOneRow, setInsertSource, setReferencedTableMap, setResultColumns, setResultToBooleanTrueNode, setTableConstructorTypes, subqueryReferencesTarget, verifySelectStarSubquery
accept, bindOffsetFetch, bindRowMultiSet, bindUserCatalogType, bindUserType, checkReliability, checkReliability, convertDefaultNode, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, foundString, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContextManager, getCursorInfo, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getNodeFactory, getNodeType, getNullNode, getParameterTypes, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, init, init, init, init, init, init, init, init, init, init, init, init, isAtomic, isInstanceOf, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeConstantAction, makeTableName, makeTableName, nodeHeader, orReliability, parseStatement, printLabel, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setContextManager, setEndOffset, setNodeType, setRefActionInfo, stackPrint, treePrint, treePrint, verifyClassExist
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDataDictionary, getReferencedTableMap, getResultSetNumber
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
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 interface Node
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.List 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 FromBaseTableStandardException
- 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 builtStandardException
- 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 visitorStandardException
- on errorApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.