pub enum Boundary {
GroundFact,
HeadAggregation,
BodyNegation,
BodyIsExpr,
InsufficientPositiveAtoms {
positive_count: usize,
},
JoinKeysExceedBinaryFallbackLimit {
context: ExecutorContext,
count: usize,
limit: usize,
},
UnsupportedKeyType {
var: String,
ty: ScalarType,
},
}Expand description
One reason a rule is ineligible for multiway planning.
Boundaries are reported independently — a rule that is both negated and over the key limit produces two boundaries, not one “first-failed” boundary. This makes the eligibility report stable against ordering changes in future analyzer passes.
Variants§
GroundFact
The rule is a ground fact (no body to plan).
HeadAggregation
The rule head contains an aggregation expression. Multiway
joins underneath an aggregation re-introduce the
aggregation-boundary problem the binary lowering already
handles via GroupBy + Project; we leave that machinery
intact rather than re-derive it inside multiway.
BodyNegation
The body contains a crate::ast::BodyLiteral::Negated
literal. Negated literals lower to set difference (Diff)
in the binary path — multiway has no equivalent at this
stage of the planner foundation.
BodyIsExpr
The body contains a crate::ast::BodyLiteral::IsExpr
computed binding. Binding-via-expression introduces a
dependency between body literals that the join graph alone
does not capture.
InsufficientPositiveAtoms
The body has fewer than two positive atoms. Multiway needs at least two atoms to be meaningful; one-atom or zero-atom bodies are not multiway candidates regardless of executor.
JoinKeysExceedBinaryFallbackLimit
The total number of distinct join-key variables exceeds the
binary-fallback executor’s pack_keys limit. Carried as a
runtime value so the explain output can name the count.
See BINARY_FALLBACK_KEY_LIMIT.
Fields
context: ExecutorContextExecutor context whose key-width cap was exceeded.
UnsupportedKeyType
A join-key variable has a [ScalarType] not supported by
the executor under consideration.
Emitted by analyze_typed when a join-key vertex has a
known type (derived from a body atom’s relation schema —
see crate::hypergraph::typed::evaluate_rule_typed and
the typed fixpoint variants) that is outside
WCOJ_SUPPORTED_KEY_TYPES. Structural analyze never
emits this variant.
Locked policy (PR 5): unknown ≠ unsupported. A vertex
whose type cannot be derived from the supplied
crate::hypergraph::RefRelationStore is not flagged
here. Transitive type propagation across recursive SCC
predicates is a follow-up slice.