| Modifier and Type | Field and Description |
|---|---|
| pack-priv List | |
| pack-priv static final int | |
| protected boolean | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv ValueNode | |
| pack-priv boolean | |
| pack-priv Properties | |
| pack-priv PredicateList | |
| pack-priv static final int | |
| private PredicateList | |
| private boolean | naturalJoin
If this flag is true, this node represents a natural join. |
| private boolean | |
| pack-priv static final int | |
| private PredicateList | |
| pack-priv SubqueryList | |
| pack-priv static final int | |
| pack-priv ResultColumnList |
| Access | Constructor and Description |
|---|---|
| pack-priv | JoinNode(ResultSetNode
The ResultSetNode on the left side of this join leftResult, ResultSetNode The ResultSetNode on the right side of this join rightResult, ValueNode The ON clause onClause, ResultColumnList The USING clause usingClause, ResultColumnList The result column list for the join selectList, Properties Properties list associated with the table tableProperties, Properties User provided optimizer overrides joinOrderStrategyProperties, ContextManager The context manager cm)Constructor for a JoinNode. |
| 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 int | addOuterJoinArguments(ActivationClassBuilder
The ActivationClassBuilder acb, MethodBuilder the method the generated code is to go into
return The number of args added mb)Generate and add any arguments specifict to outer joins. |
| protected void | adjustNumberOfRowsReturned(CostEstimate costEstimate)
Some types of joins (e.g. outer joins) will return a different number of rows than is predicted by optimizeIt() in JoinNode. |
| public ValueNode | Returns: the bound expressionBind an expression against the child tables of the JoinNode. |
| public void | bindExpressions(FromList
FromList to use/append to. fromListParam)Overrides org. Bind the expressions under this node. |
| 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. |
| private void | |
| private void | |
| private static List | Returns: a list of all the column names in the RCLthe result column list to extract the names from rcl)Extract all the column names from a result column list. |
| pack-priv FromList | Returns: FromList The fromList from the underlying SelectNode.The RCL from the outer query rcl, PredicateList PredicateList to append wherePredicates to. outerPList, SubqueryList The SubqueryList from the outer query sql, GroupByList The group by list, if any gbl, ValueNode The HAVING clause, if any havingClause)Overrides org. Flatten this JoinNode into the outer query block. |
| 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 |
| pack-priv void | generateCore(ActivationClassBuilder acb, MethodBuilder mb, int joinType)
Generate the code for a qualified join node. |
| pack-priv void | generateCore(ActivationClassBuilder
The ActivationClassBuilder acb, MethodBuilder the method the code is to go into mb, int The join type joinType, ValueNode The join clause, if any joinClause, SubqueryList The list of subqueries in the join clause, if any subquerys)Do the generation work for the join node hierarchy. |
| pack-priv ResultColumnList | Returns: ResultColumnList List of result columns from this table.The qualifier on the "*" allTableName)Overrides org. Return a ResultColumnList with all of the columns in this table. |
| private ResultColumnList | Returns: ResultColumnList List of result columns from this table.The qualifier on the "*" allTableName)Return a ResultColumnList with all of the columns in this table. |
| private ResultColumnList | Returns: RCL with all the common columnsGenerate a result column list with all the column names that appear on both sides of the join operator. |
| pack-priv CostEstimate | Returns: The final CostEstimate for this JoinNode, which is sum the costs for the inner and outer table. The number of rows, though, is that for the inner table only.Overrides org. Get the final CostEstimate for this FromTable. |
| private int | Returns: The array of arguments to the join result setThe ActivationClassBuilder for the class we're building. acb, MethodBuilder the method the generated code is going into mb, ValueNode The join clause, if any joinClause)Get the arguments to the join result set. |
| protected PredicateList | |
| pack-priv ResultSetNode | |
| pack-priv ResultSetNode | |
| 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)Overrides org. Try to find a ResultColumn in the table represented by this FromTable that matches the name in the given ColumnReference. |
| protected int | |
| protected PredicateList | |
| private void | |
| pack-priv boolean | Returns: boolean Whether or not this FromTable can be flattened.Overrides org. Is this FromTable a JoinNode which can be flattened into the parents FromList. |
| 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 static String | Returns: String The joinType as a String.The joinType as an int. joinType)Convert the joinType to a string. |
| pack-priv boolean | LOJ_reorderable(int numTables)
Overrides org. Currently we don't reordering any outer join w/ inner joins. |
| pack-priv JBitSet | LOJgetReferencedTables(int numTables)
Overrides org.
|
| public FromList | |
| 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. |
| pack-priv void | |
| pack-priv void | notFlattenableJoin()
Overrides org. Mark this node and its children as not being a flattenable join. |
| pack-priv void | |
| 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. |
| pack-priv void | projectResultColumns()
Overrides org. Find the unreferenced result columns and project them out. |
| pack-priv void | pushExpressions(PredicateList
The PredicateList from the outer RS. outerPredicateList)Overrides org. Push expressions down to the first ResultSetNode which can do expression evaluation and has the same referenced table map. |
| protected void | |
| private void | |
| 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 | |
| pack-priv void | setNaturalJoin()
Flag this as a natural join so that an implicit USING clause will be generated in the bind phase. |
| pack-priv void | |
| pack-priv FromTable | Returns: The new tree top (OuterJoin or InnerJoin).The predicate tree for the query block predicateTree, int numTables)Overrides org. Transform any Outer Join into an Inner Join where applicable. |
| pack-priv int | Returns: The lock modeOverrides org. Get the lock mode for the target of an update statement (a delete or update). |