| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | ResultSetNode.
For ease of pushing order by, offset and fetch first/next clauses into nodes. |
| Modifier and Type | Field and Description |
|---|---|
| private CostEstimate | |
| private CostEstimate | |
| private boolean | |
| private boolean | |
| private Optimizer | |
| private JBitSet | |
| private ResultColumnList | |
| private int | |
| private CostEstimate | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| 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 ResultSetNode | Returns: ResultSetNode The new top of the tree.The predicate to add predicate)Add a new predicate to the list. |
| pack-priv void | adjustForSortElimination()
Notify the underlying result set tree that the optimizer has chosen to "eliminate" a sort. |
| pack-priv 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. |
| pack-priv void | assignResultSetNumber()
Assign the next resultSetNumber to the resultSetNumber in this ResultSetNode. |
| pack-priv void | bindExpressions(FromList
FromList to use/append to. fromListParam)Bind the expressions in this ResultSetNode. |
| pack-priv void | bindExpressionsWithTables(FromList
FromList to use/append to. fromListParam)Bind the expressions in this ResultSetNode if it has tables. |
| pack-priv ResultSetNode | Returns: ResultSetNodeThe DataDictionary to use for binding dataDictionary, FromList FromList to use/append to. fromListParam)Bind the non VTI tables in this ResultSetNode. |
| pack-priv void | bindResultColumns(FromList
FromList to use/append to. fromListParam)Bind the result columns of this ResultSetNode when there is no base table to bind them to. |
| pack-priv void | bindResultColumns(TableDescriptor
The TableDescriptor for the table being
updated or inserted into targetTableDescriptor, FromVTI targetVTI, ResultColumnList For INSERT statements, the user
does not have to supply column
names (for example, "insert into t
values (1,2,3)". When this
parameter is null, it means that
the user did not supply column
names, and so the binding should
be done based on order. When it
is not null, it means do the binding
by name, not position. targetColumnList, DMLStatementNode Calling DMLStatementNode (Insert or Update) statement, FromList FromList to use/append to. fromListParam)Bind the result columns for this ResultSetNode to a base table. |
| pack-priv void | |
| pack-priv void | bindUntypedNullsToResultColumns(ResultColumnList
The ResultColumnList with the types to bind nulls to rcl)Bind untyped nulls to the types in the given ResultColumnList. |
| pack-priv ResultSetNode | Returns: ResultSetNodeFromList to use/append to. fromListParam)Bind the VTI tables in this ResultSetNode. |
| pack-priv ResultSetNode | Returns: A ResultSetNode tree modified to do any extra processing for the chosen access pathThe optimizer's decision on the access path for a result set may require the generation of extra result sets. |
| pack-priv boolean | |
| pack-priv ResultSetNode | Returns: Top of the new/same ResultSet tree.Consider materialization for this ResultSet tree if it is valid and cost effective (It is not valid if incorrect results would be returned.) |
| private ResultColumn | createGeneratedColumn(TableDescriptor targetTD, ColumnDescriptor colDesc)
Create a ResultColumn for a column with a generation clause. |
| pack-priv abstract void | decrementLevel(int
The amount to decrement by. decrement)Decrement (query block) level (0-based) for all of the tables in this ResultSet tree. |
| pack-priv ResultSetNode | Returns: a node that replaces this node and whose RCL matches the target RCL. May return this node if no changes to the RCL are needed, or if the RCL is modified in-place.the target node for the insert target, boolean are source cols in same order as target cols? inOrder, int[] int array representation of correspondence between
RCLs - colmap[i] = -1 -> missing in current RCL
colmap[i] = j -> targetRCL(i) <-> thisRCL(j+1) colMap)This ResultSet is the source for an Insert. |
| pack-priv ResultSetNode | Returns: ResultSetNode A RSN tree with a node which has a PredicateList on top.The number of tables in the query. numTables)Ensure that the top of the RSN tree has a PredicateList. |
| pack-priv void | fillInReferencedTableMap(JBitSet
The table map to fill in. passedMap)Fill the referencedTableMap with this ResultSetNode. |
| pack-priv boolean | Returns: boolean Whether or not the FromSubquery is flattenable.The outer from list fromList)Evaluate whether or not the subquery in a FromSubquery is flattenable. |
| pack-priv void | generateNormalizationResultSet(ActivationClassBuilder
The ActivationClassBuilder acb, MethodBuilder The method to put the generated code in mb, int The result set number for the NRS resultSetNumber, ResultDescription The ERD for the ResultSet resultDescription)Generate the code for a NormalizeResultSet. |
| private ResultSetNode | Returns: a ProjectRestrictNode whos RCL matches the target RCLthe target node for the insert target, int[] int array representation of correspondence between
RCLs - colmap[i] = -1 -> missing in current RCL
colmap[i] = j -> targetRCL(i) <-> thisRCL(j+1) colMap)Generate a ProjectRestrictNode to put on top of this node if it's the source for an insert, and the RCL needs reordering and/or addition of columns in order to match the target RCL. |
| pack-priv void | generateResultSet(ExpressionClassBuilder
The ExpressionClassBuilder for the class being built acb, MethodBuilder The method the expression will go into mb)General logic shared by Core compilation and by the Replication Filter compiler. |
| private ResultColumn | Returns: The RC/expression for the unspecified column.Target TableDescriptor if the target is not a VTI, null if a VTI. targetTD, FromVTI Target description if it is a VTI, null if not a VTI targetVTI, int The column number columnNumber, DataDictionary The DataDictionary dataDictionary)Generate the RC/expression for an unspecified column in an insert. |
| pack-priv ResultSetNode | Returns: The generated ProjectRestrictNode atop the original ResultSetNode.Put a ProjectRestrictNode on top of this ResultSetNode. |
| pack-priv ResultSetNode | Returns: The generated ProjectRestrictNode atop the original FromTable.Number of tables in the DML Statement numTables)Put a ProjectRestrictNode on top of each FromTable in the FromList. |
| pack-priv ResultSetNode | Returns: A parent ProjectRestrictNode to do column reorderingGet a parent ProjectRestrictNode above us. |
| pack-priv ResultColumnList | Returns: ResultColumnList The expanded list, ornull if
allTableName is non-null and doesn't match a table name in
this result setThe qualifier on the "*" allTableName)Expand "*" into a ResultColumnList with all of the columns in the table's result list. |
| pack-priv CostEstimate | |
| pack-priv CostEstimate | Returns: The CostEstimate for this ResultSetNode.Get the CostEstimate for this ResultSetNode. |
| pack-priv FromTable | |
| pack-priv CostEstimate | Returns: The final CostEstimate for this ResultSetNode.Get the final CostEstimate for this ResultSetNode. |
| pack-priv FromList | |
| pack-priv FromTable | Returns: The FromTable, if any, with the exposed name.The specified name to search for as an exposed name. name, String Schema name, if non-null. schemaName, boolean Whether or not we need an exact match on specified schema and table
names or match on table id. exactMatch)Determine whether or not the specified name is an exposed name in the current query block. |
| pack-priv ResultColumn | Returns: A ResultColumn whose expression is the ColumnNode that matches the ColumnReference. Returns null if there is no match.The columnReference whose name we're looking
for in the given table. columnReference)Try to find a ResultColumn in the table represented by this FromTable that matches the name in the given ColumnReference. |
| protected CostEstimate | |
| pack-priv Optimizer | |
| protected OptimizerImpl | Returns: If this.optimizer has has already been created by the getOptimizer() method above, then return it; otherwise, return null.Get the optimizer for this result set. |
| pack-priv ResultColumnList | Returns: an RCL that matches the target RCLthe target node for the insert target, int[] int array representation of correspondence between
RCLs - colmap[i] = -1 -> missing in current RCL
colmap[i] = j -> targetRCL(i) <-> thisRCL(j+1) colMap)Generate an RCL that can replace the original RCL of this node to match the RCL of the target for the insert. |
| public JBitSet | Returns: JBitSet Referenced table map for this ResultSetNodeGet the referencedTableMap for this ResultSetNode. |
| pack-priv ResultColumnList | Returns: ResultColumnList for this ResultSetNodeGet the resultColumns for this ResultSetNode |
| public int | |
| pack-priv CostEstimate | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv boolean | Returns: Whether or not the underlying ResultSet tree if for NOT EXISTS.Return whether or not the underlying ResultSet tree is for a NOT EXISTS join. |
| pack-priv boolean | Returns: Whether or not the underlying ResultSet tree will return a single row.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)Return whether or not the underlying ResultSet tree is ordered on the specified columns. |
| pack-priv boolean | Returns: Whether or not it is possible to do a distinct scan on this ResultSet tree.the set of distinct columns distinctColumns)Is it possible to do a distinct scan on this ResultSet tree. |
| pack-priv boolean | |
| pack-priv boolean | isUpdatableCursor(DataDictionary dd)
Determine if this result set is updatable or not, for a cursor (i.e., is it a cursor-updatable select). |
| pack-priv JBitSet | |
| public ResultDescription | Returns: A ResultDescription for this ResultSetNode.Make a ResultDescription for use in a ResultSet. |
| pack-priv ResultColumnDescriptor[] | |
| pack-priv boolean | Returns: true if the target table supports positioned updates.Mark this ResultSetNode as the target table of an updatable cursor. |
| pack-priv void | |
| pack-priv void | markStatementResultSet()
This method is overridden to allow a resultset node to know if it is the one controlling the statement -- i.e., it is the outermost result set node for the statement. |
| pack-priv ResultSetNode | Returns: The modified query treeModify the access paths according to the decisions the optimizer made. |
| pack-priv ResultSetNode | Returns: The modified query treeA list of optimizable predicates that should
be pushed to this ResultSetNode, as determined by optimizer. predList)Modify the access paths according to the decisions the optimizer made. |
| pack-priv void | |
| pack-priv void | |
| pack-priv static int | Returns: number of aggregatesCount the number of distinct aggregates in the list. |
| pack-priv ResultSetNode | Returns: ResultSetNode The top of the optimized query treeThe DataDictionary to use for optimization dataDictionary, PredicateList The PredicateList to apply. predicates, double The number of outer joining rows outerRows)Optimize a ResultSetNode. |
| public ValueNode | Returns: The parsed default as a query tree.Text of Default. defaultText)Parse a default and turn it into a query tree. |
| pack-priv boolean | Returns: Whether or not to materialize this ResultSet tree. would return valid results.Return whether or not to materialize this ResultSet tree. |
| pack-priv ResultSetNode | Returns: ResultSetNode at top of preprocessed tree.The number of tables in the DML Statement numTables, GroupByList The group by list, if any gbl, FromList The from list, if any fromList)Preprocess a ResultSetNode - this currently means: o Generating a referenced table map for each ResultSetNode. |
| pack-priv void | |
| pack-priv void | printSubNodes(int
The depth of this node in the tree depth)Overrides org. Prints the sub-nodes of this object. |
| pack-priv void | |
| pack-priv void | pushOffsetFetchFirst(ValueNode
the OFFSET, if any offset, ValueNode the OFFSET FIRST, if any fetchFirst, boolean true if the clauses were added by (and have the semantics of) a JDBC limit clause hasJDBClimitClause)Push down the offset and fetch first parameters, if any. |
| pack-priv void | pushOrderByList(OrderByList
The order by list 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. |
| pack-priv void | |
| pack-priv boolean | Returns: true if found, else falseTable name (String) to search for. name, boolean Whether or not name is for a base table baseTable)Search to see if a query references the specifed table name. |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | replaceOrForbidDefaults(TableDescriptor
The TableDescriptor for the target table. ttd, ResultColumnList The RCL for the target table. tcl, boolean true if allowed allowDefaults)Replace any DEFAULTs with the associated tree for the default if allowed, or flag (when inside top level set operator nodes). |
| pack-priv boolean | Returns: Whether or not this ResultSet tree is guaranteed to return at most 1 row based on heuristics.Return whether or not this ResultSet tree is guaranteed to return at most 1 row based on heuristics. |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | setReferencedTableMap(JBitSet
The new referencedTableMap for this ResultSetNode newRTM)Set the referencedTableMap in this ResultSetNode |
| pack-priv void | setResultColumns(ResultColumnList
The new ResultColumnList for this ResultSetNode newRCL)Set the resultColumns in this ResultSetNode |
| pack-priv void | |
| pack-priv ResultSetNode | Returns: ResultSetNode whose resultColumn was transformed; defaults to "this" here, but can be overridden by subclasses.Boolean, whether or not to just convert *'s onlyConvertAlls)Set the result column for the subquery to a boolean true, Useful for transformations such as changing: where exists (select ... |
| pack-priv void | |
| pack-priv void | setTableConstructorTypes(ResultColumnList
The ResultColumnList containing the desired result
types. typeColumns)Set the type of each parameter in the result column list for this table constructor. |
| pack-priv boolean | Returns: boolean Whether or not a reference to the table was found.The table name. name, boolean baseTable)Return whether or not this ResultSetNode contains a subquery with a reference to the specified target. |
| public String | Returns: This object as a StringOverrides org. Convert this object to a String. |
| pack-priv int | Returns: The lock modeGet the lock mode for the target of an update statement (a delete or update). |
| pack-priv void | verifySelectStarSubquery(FromList
The FromList from the outer query block(s) outerFromList, int The subquery type subqueryType)Verify that a SELECT * is valid for this type of subquery. |