| Modifier and Type | Class and Description |
|---|---|
| private static class | PredicateList.
Inner class which helps statistics routines do their work. |
| private static class | PredicateList.
Another inner class which is basically a List of Predicate Wrappers. |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private int | |
| private int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | addOptPredicate(OptimizablePredicate
The predicate to add optPredicate)Implements org. Add the given OptimizablePredicate to the end of this list. |
| public void | addOptPredicate(OptimizablePredicate optPredicate, int position)
Another flavor of addOptPredicate that inserts the given predicate at a given position. |
| pack-priv void | |
| public void | adjustForSortElimination(RequiredRowOrdering ordering)
Implements org. Walk through the predicates in this list and make any adjustments that are required to allow for proper handling of an ORDER BY clause. |
| pack-priv boolean | Returns: Whether or not all of the predicates in the list are pushable.Check if all of the predicates in the list are pushable. |
| pack-priv boolean | Returns: true if the table is referenced by all predicates,
false otherwisethe fbt)FromBaseTable to check forCheck if all the predicates reference a given |
| private void | |
| pack-priv void | |
| pack-priv void | checkTopPredicatesForEqualsConditions(int
The tableNumber of the table from which
the columns of interest come from. tableNumber, boolean[] Array of booleans for noting which columns
are in = predicates with constants or
correlation columns. eqOuterCols, int[] Array of table numbers in this query block. tableNumbers, JBitSet[] tableColMap, boolean tableNumber is the table the result columns are
coming from resultColTable)Update the array of columns in = conditions with constants or correlation or join columns. |
| private int | chooseLongestMatch(PredicateList.
choose the statistic which has the maximum match with the predicates. |
| public void | classify(Optimizable
The Optimizable table for which to classify
the predicates in this list. optTable, ConglomerateDescriptor The ConglomerateDescriptor for which to classify
the predicates in this list. cd)Implements org. Classify the predicates in this list according to the given table and conglomerate. |
| pack-priv boolean | |
| public void | copyPredicatesToOtherList(OptimizablePredicateList
The predicateList to xfer to otherList)Implements org. Non-destructive copy of all of the predicates from this list to the other list. |
| private void | |
| pack-priv void | decrementLevel(FromList
The subquery's FROM list. fromList, int Decrement size. decrement)Decrement the level of any CRs from the subquery's FROM list that are interesting to transitive closure. |
| pack-priv void | eliminateBooleanTrueAndBooleanTrue()
Eliminate predicates of the form: AndNode / \ true BooleanConstantNode true BooleanConstantNode This is useful when checking for a NOP PRN as the Like transformation on c1 like 'ASDF%' can leave one of these predicates in the list. |
| private void | finishKey(ExpressionClassBuilder
The ActivationClassBuilder for the class we're building acb, MethodBuilder mb, MethodBuilder The MethodBuilder for the method we're building exprFun, LocalField The name of the field that holds the indexable row rowField)Finish generating a start or stop key |
| private LocalField | Returns: The field that holds the indexable rowThe ActivationClassBuilder for the class we're building acb, int The number of columns in the key numberOfColumns)Generate the indexable row for a start key or stop key. |
| pack-priv void | generateInListValues(ExpressionClassBuilder
The ActivationClassBuilder for the class we're building acb, MethodBuilder The MethodBuilder for the method we're building mb)If there is an IN-list probe predicate in this list then generate the corresponding IN-list values as a DataValueDescriptor array, to be used for probing at execution time. |
| public void | generateQualifiers(ExpressionClassBuilderInterface
The ExpressionClassBuilderInterface for the class we are building acbi, MethodBuilder The method the generated code is going into mb, Optimizable The Optimizable table the Qualifiers are on optTable, boolean Generate absolute column positions if true,
else relative column positions (within the underlying
row) absolute)Implements org. Generate the qualifiers for a scan. |
| private void | generateSetColumn(ExpressionClassBuilder
The ActivationClassBuilder for the class we're building acb, MethodBuilder The MethodBuilder for the method we're building exprFun, int The position number of the column we're setting
the value in (zero-based) columnNumber, Predicate The Predicate with the value to put in the index column pred, Optimizable The Optimizable table the column is in optTable, LocalField The field that holds the indexable row rowField, boolean Are we generating start or stop key? This information
is useful for "in"'s dynamic start/stop key, bug 3858 isStartKey)Generate the code to set the value from a predicate in an index column. |
| private void | generateSingleQualifierCode(MethodBuilder consMB, Optimizable optTable, boolean absolute, ExpressionClassBuilder acb, RelationalOperator or_node, LocalField qualField, int array_idx_1, int array_idx_2)
|
| public void | generateStartKey(ExpressionClassBuilderInterface
The ExpressionClassBuilderInterface for the class we're building acbi, MethodBuilder The method the generated code is to go into mb, Optimizable The Optimizable table the start key is for optTable)Implements org. Generate the start key for a heap or index scan. |
| public void | generateStopKey(ExpressionClassBuilderInterface
The ExpressionClassBuilderInterface for the class we're building acbi, MethodBuilder the method the generated code is to go into mb, Optimizable The Optimizable table the stop key is for optTable)Implements org. Generate the stop key for a heap or index scan. |
| public OptimizablePredicate | getOptPredicate(int
"index" (0 based) into the list. index)Implements org. Return the nth OptimizablePredicate in the list. |
| pack-priv PredicateList | Returns: A list of pushable predicates, if any, that satisfy the referencedTableMap.The referenced table map referencedTableMap)Build a list of pushable predicates, if any, that satisfy the referencedTableMap. |
| public int | hasEqualityPredicateOnOrderedColumn(Optimizable optTable, int columnNumber, boolean isNullOkay)
Implements org. Check into the predicate list if the passed column has an equijoin predicate on it. |
| public boolean | hasOptimizableEqualityPredicate(Optimizable
The optimizable the column comes from. optTable, int The column number within the base table. columnNumber, boolean boolean, whether or not the IS NULL operator
satisfies the search isNullOkay)Implements org. Is there an optimizable equality predicate on the specified column? |
| public boolean | hasOptimizableEquijoin(Optimizable
The optimizable the column comes from. optTable, int The column number within the base table. columnNumber)Implements org. Is there an optimizable equijoin on the specified column? |
| private static boolean | Returns: true if the node is a constant or a parameter, false otherwisethe node to check node)Check if a node is representing a constant or a parameter. |
| public boolean | isRedundantPredicate(int
The entry in the list predNum)Implements org. Return whether or not the specified entry in the list is a redundant predicate. |
| pack-priv void | joinClauseTransitiveClosure(int
The number of tables in the query numTables, FromList The FromList in question. fromList, CompilerContext The CompilerContext to use cc)Perform transitive closure on join clauses. |
| public void | markAllPredicatesQualifiers()
Implements org. Mark all of the predicates as Qualifiers and set the numberOfQualifiers to reflect this. |
| pack-priv void | markReferencedColumns()
Mark all of the RCs and the RCs in their RC/VCN chain referenced in the predicate list as referenced. |
| private void | |
| private void | orderUsefulPredicates(Optimizable optTable, ConglomerateDescriptor cd, boolean pushPreds, boolean nonMatchingIndexScan, boolean coveringIndexScan)
|
| pack-priv void | pullExpressions(int
Number of tables in the DML Statement numTables, ValueNode The search clause to operate on. searchClause)Break apart the search clause into matching a PredicateList where each top level predicate is a separate element in the list. |
| pack-priv void | pushExpressionsIntoSelect(SelectNode
The underlying SelectNode. select, boolean Whether to make a copy of the predicate
before pushing copyPredicate)Push all predicates, which can be pushed, into the underlying select. |
| public void | pushUsefulPredicates(Optimizable
An Optimizable for the table in question optTable)Implements org. Determine which predicates in this list are useful for limiting the scan on the given table using its best conglomerate. |
| public void | putOptimizableEqualityPredicateFirst(Optimizable
The optimizable the column comes from. optTable, int The column number within the base table. columnNumber)Implements org. Find the optimizable equality predicate on the specified column and make it the first predicate in this list. |
| pack-priv void | remapColumnReferencesToExpressions()
Remap all ColumnReferences in this tree to be clones of the underlying expression. |
| public final void | removeOptPredicate(int
The index. predCtr)Implements org. Remove the OptimizablePredicate at the specified index (0-based) from the list. |
| public final void | removeOptPredicate(OptimizablePredicate pred)
Another version of removeOptPredicate that takes the Predicate to be removed, rather than the position of the Predicate. |
| pack-priv void | |
| pack-priv ValueNode | Returns: ValueNode The rebuilt expression tree.Rebuild a constant expression tree from the remaining constant predicates and delete those entries from the PredicateList. |
| pack-priv ValueNode | Returns: ValueNode The rebuilt expression tree.Rebuild an expression tree from the remaining predicates and delete those entries from the PredicateList. |
| public boolean | sameStartStopPosition()
Implements org. Can we use the same key for both the start and stop key. |
| pack-priv void | searchClauseTransitiveClosure(int
The number of tables in the query numTables, boolean Whether or not user specified a hash join hashJoinSpecified)Perform transitive closure on search clauses. |
| public double | selectivity(Optimizable
the Optimizable that the predicate list restricts. optTable)Implements org. calculate the selectivity for a set of predicates. |
| private double | |
| public void | setPredicatesAndProperties(OptimizablePredicateList
The list to set the same as this one. otherList)Implements org. Sets the given list to have the same elements as this one, and the same properties as this one (number of qualifiers and start and stop predicates. |
| public int | startOperator(Optimizable optTable)
Implements org. Get the start operator for the given Optimizable for a heap or index scan. |
| public int | stopOperator(Optimizable optTable)
Implements org. Get the stop operator for the given Optimizable for a heap or index scan. |
| public void | transferAllPredicates(OptimizablePredicateList otherList)
Implements org. Transfer all the predicates from this list to the given list. |
| protected void | transferNonQualifiers(Optimizable
The optimizable that we want qualifiers for optTable, PredicateList ParameterList for non-qualifiers otherPL)Transfer the non-qualifiers from this predicate list to the specified predicate list. |
| public void | transferPredicates(OptimizablePredicateList
The predicateList to xfer to otherList, JBitSet The table map to check against referencedTableMap, Optimizable The table to order the new predicates
against table)Implements org. Transfer the predicates whose referenced set is contained by the specified referencedTableMap from this list to the other list. |
| public boolean | useful(Optimizable
An Optimizable for the table in question optTable, ConglomerateDescriptor A ConglomerateDescriptor for the conglomerate in question cd)Implements org. Return true if this predicate list is useful for limiting the scan on the given table using the given conglomerate. |
| pack-priv void | xorReferencedSet(JBitSet
The JBitSet to XOR with. fromMap)XOR fromMap with the referenced table map in every remaining Predicate in the list. |