| Modifier and Type | Field and Description |
|---|---|
| private FormatableBitSet | |
| protected ConglomerateDescriptor | |
| protected boolean | |
| protected boolean | |
| private FormatableBitSet | |
| private FormatableBitSet | |
| private FormatableBitSet | |
| protected PredicateList | |
| protected FromBaseTable |
| Access | Constructor and Description |
|---|---|
| pack-priv | IndexToBaseRowNode(FromBaseTable source, ConglomerateDescriptor baseCD, ResultColumnList resultColumns, boolean cursorTargetTable, FormatableBitSet heapReferencedCols, FormatableBitSet indexReferencedCols, PredicateList restrictionList, boolean forUpdate, Properties tableProperties, ContextManager cm)
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | acceptChildren(Visitor
the visitor v)Overrides org. Accept the visitor for all visitable children of this node. |
| pack-priv void | adjustForSortElimination()
Overrides org. Notify the underlying result set tree that the optimizer has chosen to "eliminate" a sort. |
| pack-priv void | adjustForSortElimination(RequiredRowOrdering rowOrdering)
Overrides org. Same goal as adjustForSortElimination above, but this version takes a RequiredRowOrdering to allow nodes to adjust based on the ORDER BY clause, if needed. |
| pack-priv void | decrementLevel(int
The amount to decrement by. decrement)Overrides org. Decrement (query block) level (0-based) for this FromTable. |
| public boolean | forUpdate()
Overrides org. Implements org. Return true if this is the target table of an update |
| pack-priv void | generate(ActivationClassBuilder
The ActivationClassBuilder for the class being built acb, MethodBuilder the method for the method to be built mb)Overrides org. 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). |
| pack-priv CostEstimate | getCostEstimate()
Overrides org. Get the CostEstimate for this ResultSetNode. |
| pack-priv CostEstimate | getFinalCostEstimate()
Overrides org. Get the final CostEstimate for this FromTable. |
| private int[] | Returns: The int[] with the mapping.Fill in the column mapping for those columns coming from the index. |
| public AccessPath | getTrulyTheBestAccessPath()
Overrides org. Implements org. Get the best access path overall for this Optimizable. |
| pack-priv boolean | Returns: Whether or not the underlying FBT is for NOT EXISTS.Overrides org. Return whether or not the underlying FBT is for NOT EXISTS. |
| pack-priv boolean | Returns: Whether or not the underlying ResultSet tree will return a single row.Overrides org. Return whether or not the underlying ResultSet tree will return a single row, at most. |
| pack-priv boolean | Returns: Whether the underlying ResultSet tree is ordered on the specified column.The specified ColumnReference[] crs, boolean Whether or not the order of the CRs in the array can be permuted permuteOrdering, List<FromBaseTable> List that is to be filled with the FromBaseTable fbtHolder)Overrides org. Return whether or not the underlying ResultSet tree is ordered on the specified columns. |
| pack-priv int | Returns: The lock modeOverrides org. Get the lock mode for the target of an update statement (a delete or update). |
| allReferencedCols | back to summary |
|---|---|
| private FormatableBitSet allReferencedCols | |
| baseCD | back to summary |
|---|---|
| protected ConglomerateDescriptor baseCD | |
| cursorTargetTable | back to summary |
|---|---|
| protected boolean cursorTargetTable Hides org. | |
| forUpdate | back to summary |
|---|---|
| protected boolean forUpdate | |
| heapOnlyReferencedCols | back to summary |
|---|---|
| private FormatableBitSet heapOnlyReferencedCols | |
| heapReferencedCols | back to summary |
|---|---|
| private FormatableBitSet heapReferencedCols | |
| indexReferencedCols | back to summary |
|---|---|
| private FormatableBitSet indexReferencedCols | |
| restrictionList | back to summary |
|---|---|
| protected PredicateList restrictionList | |
| source | back to summary |
|---|---|
| protected FromBaseTable source | |
| IndexToBaseRowNode | back to summary |
|---|---|
| pack-priv IndexToBaseRowNode(FromBaseTable source, ConglomerateDescriptor baseCD, ResultColumnList resultColumns, boolean cursorTargetTable, FormatableBitSet heapReferencedCols, FormatableBitSet indexReferencedCols, PredicateList restrictionList, boolean forUpdate, Properties tableProperties, ContextManager cm) | |
| acceptChildren | back to summary |
|---|---|
| pack-priv void acceptChildren(Visitor v) throws StandardException Overrides org. Accept the visitor for all visitable children of this node.
| |
| adjustForSortElimination | back to summary |
|---|---|
| pack-priv void adjustForSortElimination() Overrides org. Doc from org. Notify the underlying result set tree that the optimizer has chosen to "eliminate" a sort. Sort elimination can happen as part of preprocessing (see esp. SelectNode.preprocess(...)) or it can happen if the optimizer chooses an access path that inherently returns the rows in the correct order (also known as a "sort avoidance" plan). In either case we drop the sort and rely on the underlying result set tree to return its rows in the correct order. For most types of ResultSetNodes we automatically get the rows in the correct order if the sort was eliminated. One exception to this rule, though, is the case of an IndexRowToBaseRowNode, for which we have to disable bulk fetching on the underlying base table. Otherwise the index scan could return rows out of order if the base table is updated while the scan is "in progress" (i.e. while the result set is open). In order to account for this (and potentially other, similar issues in the future) this method exists to notify the result set node that it is expected to return rows in the correct order. The result set can then take necessary action to satsify this requirement--such as disabling bulk fetch in the case of IndexRowToBaseRowNode. All of that said, any ResultSetNodes for which we could potentially eliminate sorts should override this method accordingly. So we don't ever expect to get here.
| |
| adjustForSortElimination | back to summary |
|---|---|
| pack-priv void adjustForSortElimination(RequiredRowOrdering rowOrdering) throws StandardException Overrides org. Doc from org. Same goal as adjustForSortElimination above, but this version takes a RequiredRowOrdering to allow nodes to adjust based on the ORDER BY clause, if needed.
| |
| decrementLevel | back to summary |
|---|---|
| pack-priv void decrementLevel(int decrement) Overrides org. Decrement (query block) level (0-based) for this FromTable. This is useful when flattening a subquery.
| |
| forUpdate | back to summary |
|---|---|
| public boolean forUpdate() Overrides org. Implements org. Doc from org. Return true if this is the target table of an update
| |
| generate | back to summary |
|---|---|
| pack-priv void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException Overrides org. 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).
| |
| getCostEstimate | back to summary |
|---|---|
| pack-priv CostEstimate getCostEstimate() Overrides org. Doc from org. Get the CostEstimate for this ResultSetNode.
| |
| getFinalCostEstimate | back to summary |
|---|---|
| pack-priv CostEstimate getFinalCostEstimate() Overrides org. Doc from org. Get the final CostEstimate for this FromTable.
| |
| getIndexColMapping | back to summary |
|---|---|
| private int[] getIndexColMapping() Fill in the column mapping for those columns coming from the index.
| |
| getTrulyTheBestAccessPath | back to summary |
|---|---|
| public AccessPath getTrulyTheBestAccessPath() Overrides org. Implements org. Doc from org. Get the best access path overall for this Optimizable.
| |
| isNotExists | back to summary |
|---|---|
| pack-priv boolean isNotExists() Overrides org. Return whether or not the underlying FBT is for NOT EXISTS.
| |
| isOneRowResultSet | back to summary |
|---|---|
| pack-priv boolean isOneRowResultSet() throws StandardException Overrides org. Return whether or not the underlying ResultSet tree will return a single row, at most. This is important for join nodes where we can save the extra next on the right side if we know that it will return at most 1 row.
| |
| isOrderedOn | back to summary |
|---|---|
| pack-priv boolean isOrderedOn(ColumnReference[] crs, boolean permuteOrdering, List<FromBaseTable> fbtHolder) throws StandardException Overrides org. Return whether or not the underlying ResultSet tree is ordered on the specified columns. RESOLVE - This method currently only considers the outermost table of the query block.
| |
| updateTargetLockMode | back to summary |
|---|---|
| pack-priv int updateTargetLockMode() Overrides org. Get the lock mode for the target of an update statement (a delete or update). The update mode will always be row for CurrentOfNodes. It will be table if there is no where clause.
| |