Package org.apache.calcite.rel.rules
Class HyperGraph
java.lang.Object
org.apache.calcite.rel.AbstractRelNode
org.apache.calcite.rel.rules.HyperGraph
- All Implemented Interfaces:
- Cloneable,- RelOptNode,- RelNode
HyperGraph represents a join graph.
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.apache.calcite.rel.RelNodeRelNode.Context
- 
Field SummaryFields inherited from class org.apache.calcite.rel.AbstractRelNodedigest, id, traitSet
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedHyperGraph(RelOptCluster cluster, RelTraitSet traitSet, List<RelNode> inputs, List<HyperEdge> edges, RelDataType rowType) protectedHyperGraph(RelOptCluster cluster, RelTraitSet traitSet, List<RelNode> inputs, List<HyperEdge> edges, RelDataType rowType, ImmutableBitSet complexEdgesBitmap, HashMap<Long, BitSet> ccpUsedEdgesMap, HashMap<Long, BitSet> simpleEdgesMap, HashMap<Long, BitSet> complexEdgesMap, HashMap<Long, BitSet> overlapEdgesMap) 
- 
Method SummaryModifier and TypeMethodDescriptionaccept(RexShuttle shuttle) Accepts a visit from a shuttle.connectCsgCmp(long csg, long cmp) If csg and cmp are connected, return the edges that connect them.voidconvertHyperEdgeCond(RelBuilder builder) Before starting enumeration, add Project on every input, make all field name unique.copy(RelTraitSet traitSet, List<RelNode> inputs) Creates a copy of this relational expression, perhaps changing traits and inputs.Describes the inputs and attributes of this relational expression.extractJoinCond(RelNode left, RelNode right, List<HyperEdge> edges) @Nullable JoinRelTypeextractJoinType(List<HyperEdge> edges) getEdges()Returns an array of this relational expression's inputs.longgetNeighborBitmap(long csg, long forbidden) voidinitEdgeBitMap(long subset) voidreplaceInput(int ordinalInParent, RelNode p) Replaces theordinalInParentth input.voidupdateEdgesForUnion(long subset1, long subset2) Methods inherited from class org.apache.calcite.rel.AbstractRelNodeaccept, childrenAccept, collectVariablesSet, collectVariablesUsed, computeSelfCost, deepEquals, deepHashCode, equals, estimateRowCount, explain, getCluster, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getRelDigest, getRelTypeName, getRowType, getTable, getTraitSet, getVariablesSet, hashCode, isEnforcer, isValid, metadata, onRegister, recomputeDigest, register, sole, toStringMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.calcite.rel.RelNodeexplain, fieldIsNullable, stripped
- 
Constructor Details- 
HyperGraphprotected HyperGraph(RelOptCluster cluster, RelTraitSet traitSet, List<RelNode> inputs, List<HyperEdge> edges, RelDataType rowType) 
- 
HyperGraphprotected HyperGraph(RelOptCluster cluster, RelTraitSet traitSet, List<RelNode> inputs, List<HyperEdge> edges, RelDataType rowType, ImmutableBitSet complexEdgesBitmap, HashMap<Long, BitSet> ccpUsedEdgesMap, HashMap<Long, BitSet> simpleEdgesMap, HashMap<Long, BitSet> complexEdgesMap, HashMap<Long, BitSet> overlapEdgesMap) 
 
- 
- 
Method Details- 
copyDescription copied from interface:RelNodeCreates a copy of this relational expression, perhaps changing traits and inputs.Sub-classes with other important attributes are encouraged to create variants of this method with more parameters. - Specified by:
- copyin interface- RelNode
- Overrides:
- copyin class- AbstractRelNode
- Parameters:
- traitSet- Trait set
- inputs- Inputs
- Returns:
- Copy of this relational expression, substituting traits and inputs
 
- 
explainTermsDescription copied from class:AbstractRelNodeDescribes the inputs and attributes of this relational expression. Each node should callsuper.explainTerms, then call theRelWriter.input(String, RelNode)andRelWriter.item(String, Object)methods for each input and attribute.- Overrides:
- explainTermsin class- AbstractRelNode
- Parameters:
- pw- Plan writer
- Returns:
- Plan writer for fluent-explain pattern
 
- 
getInputsDescription copied from interface:RelNodeReturns an array of this relational expression's inputs. If there are no inputs, returns an empty list, notnull.- Specified by:
- getInputsin interface- RelNode
- Specified by:
- getInputsin interface- RelOptNode
- Overrides:
- getInputsin class- AbstractRelNode
- Returns:
- Array of this relational expression's inputs
 
- 
replaceInputDescription copied from interface:RelNodeReplaces theordinalInParentth input. You must override this method if you overrideRelNode.getInputs().- Specified by:
- replaceInputin interface- RelNode
- Overrides:
- replaceInputin class- AbstractRelNode
- Parameters:
- ordinalInParent- Position of the child input, 0 is the first
- p- New node that should be put at position- ordinalInParent
 
- 
deriveRowType- Overrides:
- deriveRowTypein class- AbstractRelNode
 
- 
acceptDescription copied from interface:RelNodeAccepts a visit from a shuttle. If the shuttle updates expression, then a copy of the relation should be created. This new relation might have a different row-type.- Specified by:
- acceptin interface- RelNode
- Overrides:
- acceptin class- AbstractRelNode
- Parameters:
- shuttle- Shuttle
- Returns:
- A copy of this node incorporating changes made by the shuttle to this node's children
 
- 
getEdges
- 
getNeighborBitmappublic long getNeighborBitmap(long csg, long forbidden) 
- 
connectCsgCmpIf csg and cmp are connected, return the edges that connect them.
- 
initEdgeBitMappublic void initEdgeBitMap(long subset) 
- 
updateEdgesForUnionpublic void updateEdgesForUnion(long subset1, long subset2) 
- 
extractJoinType
- 
extractJoinCond
- 
convertHyperEdgeCondBefore starting enumeration, add Project on every input, make all field name unique. Convert the HyperEdge condition from RexInputRef to RexInputFieldName
 
-