Expand description
Variable-ordering interface for multiway-join planning.
The variable order is the sequence in which a multiway evaluator
binds variables. Different orders produce identical results but
can vary widely in cost (intermediate sizes, work per step). The
initial interface defines the trait shape and ships one trivial
implementation (AppearanceOrder) so the rest of the planner has
something deterministic to call. Cost-aware implementations slot in
here without breaking the trait.
§Trait signature rationale
VariableOrder::order takes the full HypergraphRule (not
just a &[Vertex]) on purpose: future selectivity-aware
implementations need to inspect hyperedge structure to weigh
orderings. Taking the whole IR now means the trivial implementation
and the selectivity-aware implementation share one signature.
Structs§
- Appearance
Order - Trivial variable order: variables in their first-appearance
order across the body. Already the construction order produced
by
HypergraphRule::from_rule, so this is just anIntoIteratoroverhg.vertex_ids(). - Cost
Prediction Record - Cost-model output for WCOJ-vs-hash prediction.
- Full
Variable Order - Planned all-variable order and edge permutation for a WCOJ shape.
- KClique
Edge - Binary relation edge in a planned WCOJ shape.
- KClique
Shape - Shape consumed by the full-variable WCOJ planner.
- Variable
Share - Per-variable share allocated by the planner.
Enums§
- Predicted
Winner - Predicted lower-cost path for a benchmark cell.
Traits§
- Stats
Source - Relation-level statistics required by the full-variable WCOJ planner.
- Variable
Order - Compute a variable order for a
HypergraphRule.
Functions§
- plan_
kclique_ var_ order - Plans a full variable order for a K-clique-family WCOJ shape.