Package org.apache.calcite.rel.rules
Class HyperEdge
java.lang.Object
org.apache.calcite.rel.rules.HyperEdge
Edge in HyperGraph, that represents a join predicate.
-
Constructor Summary
ConstructorsConstructorDescriptionHyperEdge(org.apache.calcite.rel.rules.HyperEdge.TotalEligibilitySet tes, List<ConflictRule> conflictRules, long leftNodeUsedInPredicate, long rightNodeUsedInPredicate, long initialLeftNodeBits, long initialRightNodeBits, JoinRelType joinType, RexNode condition) -
Method Summary
Modifier and TypeMethodDescriptionaccept(RexShuttle shuttle) adjustNodeBit(int nodeOffset) WhenJoinToHyperGraphRuleconstructs a hypergraph , if the right child of Join is a HyperGraph class, all bitmaps related to inputs in this right child need to be shifted according to the number of inputs in the left child of Join.createHyperEdgesFromJoinConds(Map<Integer, Integer> inputRefToNodeIndexMap, Map<Integer, Integer> inputRefToFieldIndexMap, List<RexNode> joinConds, List<ConflictRule> conflictRules, JoinRelType joinType, int leftNodeCount, int nodeCount) Build hyperedges corresponding to a join operator.longlonglonglonglonglonglongbooleanisSimple()toString()
-
Constructor Details
-
HyperEdge
public HyperEdge(org.apache.calcite.rel.rules.HyperEdge.TotalEligibilitySet tes, List<ConflictRule> conflictRules, long leftNodeUsedInPredicate, long rightNodeUsedInPredicate, long initialLeftNodeBits, long initialRightNodeBits, JoinRelType joinType, RexNode condition)
-
-
Method Details
-
getEndpoint
public long getEndpoint() -
getLeftEndpoint
public long getLeftEndpoint() -
getRightEndpoint
public long getRightEndpoint() -
getLeftNodeUsedInPredicate
public long getLeftNodeUsedInPredicate() -
getRightNodeUsedInPredicate
public long getRightNodeUsedInPredicate() -
getConflictRules
-
getInitialLeftNodeBits
public long getInitialLeftNodeBits() -
getInitialRightNodeBits
public long getInitialRightNodeBits() -
isSimple
public boolean isSimple() -
getJoinType
-
getCondition
-
toString
-
accept
-
adjustNodeBit
WhenJoinToHyperGraphRuleconstructs a hypergraph , if the right child of Join is a HyperGraph class, all bitmaps related to inputs in this right child need to be shifted according to the number of inputs in the left child of Join.- Parameters:
nodeOffset- number of inputs in the left child- Returns:
- HyperEdge produced after shifting
-
createHyperEdgesFromJoinConds
public static List<HyperEdge> createHyperEdgesFromJoinConds(Map<Integer, Integer> inputRefToNodeIndexMap, Map<Integer, Integer> inputRefToFieldIndexMap, List<RexNode> joinConds, List<ConflictRule> conflictRules, JoinRelType joinType, int leftNodeCount, int nodeCount) Build hyperedges corresponding to a join operator. The construction of a HyperEdge includes total eligibility set, conflict rules, node-related bitmaps, predicate expressions (RexInputRef is replaced by RexNodeAndFieldIndex) and join type.- Parameters:
inputRefToNodeIndexMap- a map from inputRef to node indexinputRefToFieldIndexMap- a map from inputRef to field indexjoinConds- join conditionsconflictRules- all conflict rulesjoinType- join typeleftNodeCount- number of inputs in the left child of JoinnodeCount- number of inputs of Join- Returns:
- HyperEdge list
-