| Package | Description |
|---|---|
| org.apache.calcite.rel.rules |
Provides a core set of planner rules.
|
| Modifier and Type | Field and Description |
|---|---|
private LoptJoinTree |
LoptJoinTree.BinaryTree.parent |
| Modifier and Type | Method and Description |
|---|---|
private LoptJoinTree |
LoptOptimizeJoinRule.addFactorToTree(RelMetadataQuery mq,
RelBuilder relBuilder,
LoptMultiJoin multiJoin,
LoptSemiJoinOptimizer semiJoinOpt,
LoptJoinTree joinTree,
int factorToAdd,
BitSet factorsNeeded,
List<RexNode> filtersToAdd,
boolean selfJoin)
Adds a new factor into the current join tree.
|
private LoptJoinTree |
LoptOptimizeJoinRule.addToTop(RelMetadataQuery mq,
RelBuilder relBuilder,
LoptMultiJoin multiJoin,
LoptSemiJoinOptimizer semiJoinOpt,
LoptJoinTree joinTree,
int factorToAdd,
List<RexNode> filtersToAdd,
boolean selfJoin)
Creates a join tree with the new factor added to the top of the tree
|
private LoptJoinTree |
LoptOptimizeJoinRule.createJoinSubtree(RelMetadataQuery mq,
RelBuilder relBuilder,
LoptMultiJoin multiJoin,
LoptJoinTree left,
LoptJoinTree right,
RexNode condition,
JoinRelType joinType,
List<RexNode> filtersToAdd,
boolean fullAdjust,
boolean selfJoin)
Creates a LogicalJoin given left and right operands and a join condition.
|
private LoptJoinTree |
LoptOptimizeJoinRule.createOrdering(RelMetadataQuery mq,
RelBuilder relBuilder,
LoptMultiJoin multiJoin,
LoptSemiJoinOptimizer semiJoinOpt,
int firstFactor)
Generates a join tree with a specific factor as the first factor in the
join tree
|
private LoptJoinTree |
LoptOptimizeJoinRule.createReplacementJoin(RelBuilder relBuilder,
LoptMultiJoin multiJoin,
LoptSemiJoinOptimizer semiJoinOpt,
LoptJoinTree currJoinTree,
int leftIdx,
int factorToAdd,
ImmutableIntList newKeys,
Integer[] replacementKeys,
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,
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.
|
LoptJoinTree |
LoptJoinTree.getLeft() |
LoptJoinTree |
LoptJoinTree.BinaryTree.getParent() |
LoptJoinTree |
LoptJoinTree.getRight() |
private LoptJoinTree |
LoptOptimizeJoinRule.pushDownFactor(RelMetadataQuery mq,
RelBuilder relBuilder,
LoptMultiJoin multiJoin,
LoptSemiJoinOptimizer semiJoinOpt,
LoptJoinTree joinTree,
int factorToAdd,
BitSet factorsNeeded,
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
|
| Modifier and Type | Method and Description |
|---|---|
private void |
LoptOptimizeJoinRule.addAdditionalFilters(RelBuilder relBuilder,
LoptMultiJoin multiJoin,
LoptJoinTree left,
LoptJoinTree right,
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,
BitSet factorsNeeded,
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,
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,
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,
List<Integer> origJoinOrder,
List<RelDataTypeField> origFields)
Adjusts a filter to reflect a newly added factor in the middle of an
existing join tree
|
private Double |
LoptOptimizeJoinRule.computeJoinCardinality(RelMetadataQuery mq,
LoptMultiJoin multiJoin,
LoptSemiJoinOptimizer semiJoinOpt,
LoptJoinTree joinTree,
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,
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,
Integer[] replacementKeys,
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,
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,
List<String> fieldNames)
Creates the topmost projection that will sit on top of the selected join
ordering.
|
private int |
LoptOptimizeJoinRule.getBestNextFactor(RelMetadataQuery mq,
LoptMultiJoin multiJoin,
BitSet factorsToAdd,
BitSet factorsAdded,
LoptSemiJoinOptimizer semiJoinOpt,
LoptJoinTree joinTree,
List<RexNode> filtersToAdd)
Determines the best factor to be added next into a join tree.
|
void |
LoptMultiJoin.getChildFactors(LoptJoinTree joinTree,
ImmutableBitSet.Builder childFactors)
Deprecated.
|
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,
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,
BitSet factorsNeeded,
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.
|
| Constructor and Description |
|---|
BinaryTree(LoptJoinTree parent) |
Leaf(int rootId,
LoptJoinTree parent) |
Node(LoptJoinTree.BinaryTree left,
LoptJoinTree.BinaryTree right,
LoptJoinTree parent) |
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.