Note
A ProjectRestrictNode extends FromTable since it can exist in a FromList.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| pack-priv ValueNode | constantRestriction
Constant expressions to be evaluated here. |
| private boolean | |
| pack-priv SubqueryList | projectSubquerys
List of subqueries in projection |
| pack-priv ValueNode | restriction
The ValueNode for the restriction to be evaluated here. |
| pack-priv PredicateList | restrictionList
Restriction as a PredicateList |
| pack-priv SubqueryList | restrictSubquerys
List of subqueries in restriction |
| private String | |
| private boolean | validatingCheckConstraints
Used with |
| Access | Constructor and Description |
|---|---|
| pack-priv | ProjectRestrictNode(ResultSetNode
The child ResultSetNode childResult, ResultColumnList The result column list for the projection projection, ValueNode An expression representing the restriction to be
evaluated here. restriction, PredicateList Restriction as a PredicateList restrictionList, SubqueryList List of subqueries in the projection projectSubquerys, SubqueryList List of subqueries in the restriction restrictSubquerys, Properties Properties list associated with the table tableProperties, ContextManager The context manager cm)Constructor for a ProjectRestrictNode. |
| 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)Overrides org. Add a new predicate to the list. |
| pack-priv ResultSetNode | Returns: Top of the new/same ResultSet tree.Overrides org. Consider materialization for this ResultSet tree if it is valid and cost effective (It is not valid if incorrect results would be returned.) |
| public boolean | considerSortAvoidancePath()
Overrides org. Implements org. Check whether this optimizable's sort avoidance path should be considered. |
| 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. |
| public boolean | feasibleJoinStrategy(OptimizablePredicateList
The predicate list that has been pushed down to
this optimizable predList, Optimizer The optimizer to use. optimizer)Overrides org. Implements org. Is the current proposed join strategy for this optimizable feasible given the predicate list? |
| 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 void | generate(ActivationClassBuilder
The ActivationClassBuilder for the class being built acb, MethodBuilder The method for the generated code to go into mb)Overrides org. For joins, the tree will be (nodes are left out if the clauses are empty): ProjectRestrictResultSet -- for the having and the select list SortResultSet -- for the group by list ProjectRestrictResultSet -- for the where and the select list (if no group or having) the result set for the fromList |
| private void | generateMinion(ExpressionClassBuilder
The ExpressionClassBuilder for the class being built acb, MethodBuilder The method the expression will go into mb, boolean genChildResultSet)Logic shared by generate() and generateResultSet(). |
| pack-priv void | generateNOPProjectRestrict()
Bypass the generation of this No-Op ProjectRestrict, and just generate its child result set. |
| pack-priv void | generateResultSet(ExpressionClassBuilder
The ExpressionClassBuilder for the class being built acb, MethodBuilder The method the expression will go into mb)Overrides org. General logic shared by Core compilation. |
| public AccessPath | getBestAccessPath()
Overrides org. Implements org. Get the best access path for this Optimizable. |
| public AccessPath | getBestSortAvoidancePath()
Overrides org. Implements org. Get the best sort-avoidance path for this Optimizable. |
| pack-priv CostEstimate | Returns: The CostEstimate for this ProjectRestrictNode, which is the cost estimate for the child node.Overrides org. Get the CostEstimate for this ProjectRestrictNode. |
| public AccessPath | getCurrentAccessPath()
Overrides org. Implements org. Get the current access path under consideration for this Optimizable |
| pack-priv CostEstimate | Returns: The final CostEstimate for this ProjectRestrictNode, which is the final cost estimate for the child node.Overrides org. Get the final CostEstimate for this ProjectRestrictNode. |
| 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. |
| pack-priv PredicateList | Returns: The restriction list from this node.Return the restriction list from this node. |
| public int | getTableNumber()
Overrides org. Implements org. Get this Optimizable's table number |
| public AccessPath | getTrulyTheBestAccessPath()
Overrides org. Implements org. Get the best access path overall for this Optimizable. |
| pack-priv String | Returns: The user specified join strategy, if any for this table.Overrides org. Return the user specified join strategy, if any for this table. |
| 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)Overrides org. Is it possible to do a distinct scan on this ResultSet tree. |
| public boolean | legalJoinOrder(JBitSet
The tables that have been placed so far in the join order. assignedTableMap)Overrides org. Implements org. Can this Optimizable appear at the current location in the join order. |
| pack-priv void | markForDistinctScan()
Overrides org. Mark the underlying scan as a distinct scan. |
| public Optimizable | modifyAccessPath(JBitSet
Bit map of the tables that are outer to this one
in the join order. outerTables)Overrides org. Implements org. Modify the access path for this Optimizable, as necessary. |
| public boolean | nextAccessPath(Optimizer
Optimizer to use. optimizer, OptimizablePredicateList The predicate list for this optimizable.
The optimizer always passes null, and it is up
to the optimizable object to pass along its
own predicate list, if appropriate, when delegating
this method. predList, RowOrdering The row ordering for all the outer tables in
the join order. This method will add the ordering
of the next access path to the given RowOrdering. rowOrdering)Overrides org. Implements org. Choose the next access path to evaluate for this Optimizable. |
| pack-priv boolean | Returns: true if this ProjectRestrict is a No-Op.Determine whether this ProjectRestrict does anything. |
| pack-priv ResultSetNode | Returns: ResultSetNode The top of the optimized subtreeThe DataDictionary to use for optimization dataDictionary, PredicateList The PredicateList to optimize. This should
be a join predicate. predicates, double The number of outer joining rows outerRows)Overrides org. Optimize this ProjectRestrictNode. |
| public CostEstimate | optimizeIt(Optimizer
Optimizer to use. optimizer, OptimizablePredicateList The predicate list to optimize against predList, CostEstimate The CostEstimate for the outer tables in the join order,
telling how many times this Optimizable will be scanned. outerCost, RowOrdering The row ordering for all the tables in the
join order, including this one. rowOrdering)Overrides org. Implements org. Choose the best access path for this Optimizable. |
| pack-priv ResultSetNode | Returns: The generated ProjectRestrictNode atop the original FromTable.Number of tables in the DML Statement numTables, GroupByList The group by list, if any gbl, FromList The from list, if any fromList)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. |
| public void | pullOptPredicates(OptimizablePredicateList
The list to put the pulled predicates
in. optimizablePredicates)Overrides org. Implements org. Pull all the OptimizablePredicates from this Optimizable and put them in the given OptimizablePredicateList. |
| pack-priv void | pushExpressions(PredicateList
The PredicateList. predicateList)Overrides org. Push expressions down to the first ResultSetNode which can do expression evaluation and has the same referenced table map. |
| 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, if any, to the underlying child result set. |
| public boolean | pushOptPredicate(OptimizablePredicate
OptimizablePredicate to push down. optimizablePredicate)Overrides org. Implements org. Push an OptimizablePredicate down, if this node accepts it. |
| pack-priv void | pushOrderByList(OrderByList
The order by list orderByList)Overrides org. Push the order by list down from InsertNode 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 void | rememberAsBest(int
The type of plan (one of Optimizer.NORMAL_PLAN
or Optimizer.SORT_AVOIDANCE_PLAN) planType, Optimizer The OptimizerImpl that is telling this Optimizable
to remember its current path as "truly the best". optimizer)Overrides org. Implements org. Remember the current access path as the best one (so far). |
| public void | rememberSortAvoidancePath()
Overrides org. Implements org. Mark this optimizable so that its sort avoidance path will be considered. |
| private Optimizable | Returns: The new (same) top of our result set tree.This method creates a HashTableNode between the PRN and it's child when the optimizer chooses hash join on an arbitrary (non-FBT) result set tree. |
| pack-priv void | setRefActionInfo(long fkIndexConglomId, int[] fkColArray, String parentResultSetId, boolean dependentScan)
Overrides org. set the Information gathered from the parent table that is required to perform a referential action on dependent table. |
| pack-priv void | |
| pack-priv void | |
| public void | startOptimizing(Optimizer optimizer, RowOrdering rowOrdering)
Overrides org. Implements org. Begin the optimization process for this Optimizable. |
| public double | uniqueJoin(OptimizablePredicateList
The predicate list to check predList)Overrides org. Implements org. Does this optimizable have a uniqueness condition on the given predicate list, and if so, how many unique keys will be returned per scan. |
| pack-priv int | Returns: The lock modeOverrides org. Get the lock mode for the target of an update statement (a delete or update). |
| public void | verifyProperties(DataDictionary
The DataDictionary to use. dDictionary)Overrides org. Implements org. Verify that the Properties list with optimizer overrides, if specified, is valid |