| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| pack-priv FromList | fromList
List of tables in the FROM clause of this SELECT |
| pack-priv GroupByList | groupByList
List of result columns in GROUP BY clause |
| private List | havingAggregates
Aggregates in the HAVING clause. |
| pack-priv ValueNode | |
| pack-priv SubqueryList | |
| private boolean | |
| private int | |
| private boolean | |
| pack-priv boolean | |
| pack-priv ValueNode | |
| pack-priv boolean | |
| pack-priv OptimizerPlan | overridingPlan
Full plan for this SELECT as specified in an optimizer override |
| private FromList | |
| pack-priv ResultSetNode. | |
| private List | selectAggregates
Aggregates in the SELECT list. |
| pack-priv SubqueryList | |
| pack-priv FromTable | |
| private boolean | wasGroupBy
User specified a group by without aggregates and we turned it into a select distinct |
| private List | whereAggregates
Aggregates in the WHERE clause. |
| pack-priv ValueNode | whereClause
The ValueNode for the WHERE clause must represent a boolean expression. |
| pack-priv PredicateList | |
| pack-priv SubqueryList | |
| pack-priv List | windowFuncCalls
List of window function calls (e.g. ROW_NUMBER, AVG(i), DENSE_RANK). |
| pack-priv WindowList | windows
List of windows. |
| Access | Constructor and Description |
|---|---|
| pack-priv | SelectNode(ResultColumnList selectList, FromList fromList, ValueNode whereClause, GroupByList groupByList, ValueNode havingClause, WindowList windowDefinitionList, OptimizerPlan overridingPlan, 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. |
| private WindowList | |
| pack-priv ResultSetNode | Returns: ResultSetNode The new top of the tree.The predicate to add predicate)Overrides org. Add a new predicate to the list. |
| pack-priv void | bindExpressions(FromList
FromList to use/append to. fromListParam)Overrides org. Bind the expressions in this SelectNode. |
| pack-priv void | bindExpressionsWithTables(FromList
FromList to use/append to. fromListParam)Overrides org. 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)Overrides org. Bind the tables in this SelectNode. |
| pack-priv void | bindResultColumns(FromList
FromList to use/append to. fromListParam)Overrides org. 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)Overrides org. Bind the result columns for this ResultSetNode to a base table. |
| pack-priv void | bindTargetExpressions(FromList fromListParam)
Overrides org. Bind the expressions in the target list. |
| pack-priv void | bindUntypedNullsToResultColumns(ResultColumnList
The ResultColumnList with the types to bind to. bindingRCL)Overrides org. Bind any untyped null nodes to the types in the given ResultColumnList. |
| pack-priv static void | |
| pack-priv void | |
| pack-priv void | decrementLevel(int
The amount to decrement by. decrement)Implements abstract org. Decrement (query block) level (0-based) for all of the tables in this ResultSet tree. |
| 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)Overrides org. Ensure that the top of the RSN tree has a PredicateList. |
| pack-priv ColumnReference | Returns: ColumnReference ColumnReference to the column, if foundName of the column colName)Find colName in the result columns and return underlying columnReference. |
| pack-priv boolean | Returns: boolean Whether or not the FromSubquery is flattenable.The outer from list fromList)Overrides org. Evaluate whether or not the subquery in a FromSubquery is flattenable. |
| pack-priv ResultSetNode | Returns: ResultSetNode new ResultSetNode atop the query tree.The size of the original FROM list, before
generation of join tree. origFromListSize)Overrides org. Replace this SelectNode with a ProjectRestrictNode, since it has served its purpose. |
| pack-priv FromTable | getCursorTargetTable()
Overrides org. Assumes that isCursorUpdatable has been called, and that it is only called for updatable cursors. |
| pack-priv CostEstimate | Returns: The final CostEstimate for this SelectNode, which is the final cost estimate for the best join order of this SelectNode's optimizer.Overrides org. Get the final CostEstimate for this SelectNode. |
| pack-priv FromList | Returns: FromList The fromList for this SelectNode.Overrides org. Return the fromList for this SelectNode. |
| 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)Overrides org. Determine whether or not the specified name is an exposed name in the current query block. |
| private Optimizer | getOptimizer(OptimizableList optList, OptimizablePredicateList predList, DataDictionary dataDictionary, RequiredRowOrdering requiredRowOrdering, OptimizerPlan overridingPlan)
Get an optimizer to use for this SelectNode. |
| pack-priv SubqueryList | Returns: SubqueryList The selectSubquerys for this SelectNode.Return the selectSubquerys for this SelectNode. |
| pack-priv ValueNode | Returns: ValueNode The whereClause for this SelectNode.Return the whereClause for this SelectNode. |
| pack-priv PredicateList | Returns: PredicateList The wherePredicates for this SelectNode.Return the wherePredicates for this SelectNode. |
| pack-priv SubqueryList | Returns: SubqueryList The whereSubquerys for this SelectNode.Return the whereSubquerys for this SelectNode. |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv boolean | Returns: true if this select node has any windows on itUsed by SubqueryNode to avoid flattening of a subquery if a window is defined on it. |
| private boolean | Returns: boolean Whether or not this node returns an ordered result set.Is the result of this node an ordered result set. |
| pack-priv boolean | isUpdatableCursor(DataDictionary dd)
Overrides org. Determine if this select is updatable or not, for a cursor. |
| pack-priv void | |
| pack-priv ResultSetNode | Returns: The modified query treeA list of optimizable predicates that should
be pushed to this ResultSetNode, as determined by optimizer. predList)Overrides org. Modify the access paths according to the decisions the optimizer made. |
| pack-priv ResultSetNode | Returns: A QueryTree with the necessary modifications madeOverrides org. Modify the access paths according to the choices the optimizer made. |
| private ValueNode | normExpressions(ValueNode
clause to normalize boolClause)Put the expression trees in conjunctive normal form |
| pack-priv ResultSetNode | Returns: ResultSetNode The top of the optimized treeThe DataDictionary to use for optimization dataDictionary, PredicateList The predicate list to optimize against predicateList, double The number of outer joining rows outerRows)Overrides org. Optimize this SelectNode. |
| private void | performTransitiveClosure(int
The number of tables in the query numTables)Peform the various types of transitive closure on the where clause. |
| pack-priv ResultSetNode | Returns: The generated ProjectRestrictNode atop the original FromTable.The number of tables in the DML Statement numTables, GroupByList The outer group by list, if any gbl, FromList The from list, if any fl)Overrides org. Put a ProjectRestrictNode on top of each FromTable in the FromList. |
| 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 | pushExpressionsIntoSelect(Predicate
The predicate that we attempt to push predicate)Push an expression into this SELECT (and possibly down into one of the tables in the FROM list). |
| 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)Overrides org. Push down the offset and fetch first parameters to this node. |
| pack-priv void | pushOrderByList(OrderByList
The order by list orderByList)Overrides org. 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. |
| public void | pushQueryExpressionSuffix()
Overrides org. Set up a new level for order by and fetch/offset clauses. |
| public boolean | Returns: true if references SESSION schema tables, else falseOverrides org. Return true if the node references SESSION schema tables (temporary or permanent) |
| 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)Overrides org. Search to see if a query references the specifed table name. |
| pack-priv void | rejectParameters()
Overrides org. Check for (and reject) ? |
| 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)Overrides org. 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.Overrides org. Return whether or not this ResultSet tree is guaranteed to return at most 1 row based on heuristics. |
| pack-priv String | |
| pack-priv boolean | Returns: boolean Whether or not a reference to the table was found.The table name. name, boolean Whether or not table is a base table. baseTable)Overrides org. Return whether or not this ResultSetNode contains a subquery with a reference to the specified target table. |
| public String | Returns: This object as a StringOverrides org. Convert this object to a String. |
| pack-priv boolean | Returns: Whether or not this subquery can be flattened based on a uniqueness condition.Whether or not the column returned
by this select, if it is a ColumnReference,
is in an equality comparison. additionalEQ)Determine whether or not this subquery, the SelectNode is in a subquery, can be flattened into the outer query block based on a uniqueness condition. |
| pack-priv int | Returns: The lock modeOverrides org. Get 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)Overrides org. Verify that a SELECT * is valid for this type of subquery. |