private void |
LoptOptimizeJoinRule.addAdditionalFilters(RelBuilder relBuilder,
LoptMultiJoin multiJoin,
LoptJoinTree left,
LoptJoinTree right,
java.util.List<RexNode> filtersToAdd) |
Determines whether any additional filters are applicable to a join tree.
|
private LoptJoinTree |
LoptOptimizeJoinRule.addFactorToTree(RelMetadataQuery mq,
RelBuilder relBuilder,
LoptMultiJoin multiJoin,
LoptSemiJoinOptimizer semiJoinOpt,
LoptJoinTree joinTree,
int factorToAdd,
java.util.BitSet factorsNeeded,
java.util.List<RexNode> filtersToAdd,
boolean selfJoin) |
Adds a new factor into the current join tree.
|
private RexNode |
LoptOptimizeJoinRule.addFilters(LoptMultiJoin multiJoin,
LoptJoinTree leftTree,
int leftIdx,
LoptJoinTree rightTree,
java.util.List<RexNode> filtersToAdd,
boolean adjust) |
Determines which join filters can be added to the current join tree.
|
private LoptJoinTree |
LoptOptimizeJoinRule.addToTop(RelMetadataQuery mq,
RelBuilder relBuilder,
LoptMultiJoin multiJoin,
LoptSemiJoinOptimizer semiJoinOpt,
LoptJoinTree joinTree,
int factorToAdd,
java.util.List<RexNode> filtersToAdd,
boolean selfJoin) |
Creates a join tree with the new factor added to the top of the tree
|
private RexNode |
LoptOptimizeJoinRule.adjustFilter(LoptMultiJoin multiJoin,
LoptJoinTree left,
LoptJoinTree right,
RexNode condition,
int factorAdded,
java.util.List<java.lang.Integer> origJoinOrder,
java.util.List<RelDataTypeField> origFields) |
Adjusts a filter to reflect a newly added factor in the middle of an
existing join tree
|
private java.lang.Double |
LoptOptimizeJoinRule.computeJoinCardinality(RelMetadataQuery mq,
LoptMultiJoin multiJoin,
LoptSemiJoinOptimizer semiJoinOpt,
LoptJoinTree joinTree,
java.util.List<RexNode> filters,
int factor) |
Computes the cardinality of the join columns from a particular factor,
when that factor is joined with another join tree.
|
private LoptJoinTree |
LoptOptimizeJoinRule.createJoinSubtree(RelMetadataQuery mq,
RelBuilder relBuilder,
LoptMultiJoin multiJoin,
LoptJoinTree left,
LoptJoinTree right,
RexNode condition,
JoinRelType joinType,
java.util.List<RexNode> filtersToAdd,
boolean fullAdjust,
boolean selfJoin) |
Creates a LogicalJoin given left and right operands and a join condition.
|
private LoptJoinTree |
LoptOptimizeJoinRule.createReplacementJoin(RelBuilder relBuilder,
LoptMultiJoin multiJoin,
LoptSemiJoinOptimizer semiJoinOpt,
LoptJoinTree currJoinTree,
int leftIdx,
int factorToAdd,
ImmutableIntList newKeys,
java.lang.Integer[] replacementKeys,
java.util.List<RexNode> filtersToAdd) |
Creates a replacement join, projecting either dummy columns or
replacement keys from the factor that doesn't actually need to be joined.
|
private LoptJoinTree |
LoptOptimizeJoinRule.createReplacementSemiJoin(RelBuilder relBuilder,
LoptMultiJoin multiJoin,
LoptSemiJoinOptimizer semiJoinOpt,
LoptJoinTree factTree,
int dimIdx,
java.util.List<RexNode> filtersToAdd) |
In the event that a dimension table does not need to be joined because of
a semijoin, this method creates a join tree that consists of a projection
on top of an existing join tree.
|
private RelNode |
LoptOptimizeJoinRule.createTopProject(RelBuilder relBuilder,
LoptMultiJoin multiJoin,
LoptJoinTree joinTree,
java.util.List<java.lang.String> fieldNames) |
Creates the topmost projection that will sit on top of the selected join
ordering.
|
private int |
LoptOptimizeJoinRule.getBestNextFactor(RelMetadataQuery mq,
LoptMultiJoin multiJoin,
java.util.BitSet factorsToAdd,
java.util.BitSet factorsAdded,
LoptSemiJoinOptimizer semiJoinOpt,
LoptJoinTree joinTree,
java.util.List<RexNode> filtersToAdd) |
Determines the best factor to be added next into a join tree.
|
void |
LoptMultiJoin.getChildFactors(LoptJoinTree joinTree,
ImmutableBitSet.Builder childFactors) |
Deprecated.
|
java.util.List<RelDataTypeField> |
LoptMultiJoin.getJoinFields(LoptJoinTree left,
LoptJoinTree right) |
Retrieves the fields corresponding to a join between a left and right
tree
|
boolean |
LoptMultiJoin.hasAllFactors(LoptJoinTree joinTree,
java.util.BitSet factorsNeeded) |
Returns true if a join tree contains all factors required
|
private boolean |
LoptOptimizeJoinRule.needsAdjustment(LoptMultiJoin multiJoin,
int[] adjustments,
LoptJoinTree joinTree,
LoptJoinTree otherTree,
boolean selfJoin) |
Sets an array indicating how much each factor in a join tree needs to be
adjusted to reflect the tree's join ordering
|
private LoptJoinTree |
LoptOptimizeJoinRule.pushDownFactor(RelMetadataQuery mq,
RelBuilder relBuilder,
LoptMultiJoin multiJoin,
LoptSemiJoinOptimizer semiJoinOpt,
LoptJoinTree joinTree,
int factorToAdd,
java.util.BitSet factorsNeeded,
java.util.List<RexNode> filtersToAdd,
boolean selfJoin) |
Creates a join tree where the new factor is pushed down one of the
operands of the current join tree
|
private RexNode |
LoptOptimizeJoinRule.swapFilter(RexBuilder rexBuilder,
LoptMultiJoin multiJoin,
LoptJoinTree origLeft,
LoptJoinTree origRight,
RexNode condition) |
Adjusts a filter to reflect swapping of join inputs
|
private boolean |
LoptOptimizeJoinRule.swapInputs(RelMetadataQuery mq,
LoptMultiJoin multiJoin,
LoptJoinTree left,
LoptJoinTree right,
boolean selfJoin) |
Swaps the operands to a join, so the smaller input is on the right.
|