Package org.apache.calcite.rel.rules
Class DpHyp
java.lang.Object
org.apache.calcite.rel.rules.DpHyp
The core process of dphyp enumeration algorithm.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDpHyp(HyperGraph hyperGraph, RelBuilder builder, RelMetadataQuery relMetadataQuery, int bloat) -
Method Summary
Modifier and TypeMethodDescription@Nullable RelNodevoidThe entry function of the algorithm.protected booleanverifyDpResultRowType(RelNode plan, List<HyperGraph.NodeState> resultOrder) Verify that the row type of plans generated by dphyp is equivalent to the origin plan.
-
Field Details
-
hyperGraph
-
builder
-
-
Constructor Details
-
DpHyp
public DpHyp(HyperGraph hyperGraph, RelBuilder builder, RelMetadataQuery relMetadataQuery, int bloat)
-
-
Method Details
-
startEnumerateJoin
public void startEnumerateJoin()The entry function of the algorithm. We use a bitmap to represent a leaf node, which indicates the position of the corresponding leaf node inHyperGraph.After the enumeration is completed, the best join order will be stored in the
dpTable. -
getBestPlan
-
verifyDpResultRowType
Verify that the row type of plans generated by dphyp is equivalent to the origin plan.- Parameters:
plan- plan generated by dphypresultOrder- node status ordered list- Returns:
- true if the plan row type equivalent to the hyperGraph row type
-