Expand description
Join algorithms for Kermit’s relational algebra engine.
Implements the Leapfrog Triejoin algorithm,
which performs worst-case optimal multi-way joins over trie-structured
relations. The algorithm is generic over any data structure that implements
TrieIterable.
Structs§
- Join
Query - A parsed Datalog join query of the form
Head :- Body1, Body2, ... . - Leapfrog
Triejoin - Entry point for the Leapfrog Triejoin algorithm, implementing
JoinAlgofor anyTrieIterabledata structure. - Singleton
Trie Iter - Unary trie iterator holding a single
usizevalue.
Enums§
- Join
Algorithm - The available join algorithm implementations.
- Rewrite
Error - Error returned by
rewrite_atomswhen an atom does not match the expectedc<digits>shape. - Trie
Iter Kind - Either borrows a real relation or owns a synthetic singleton.
Traits§
- Join
Algo - The
JoinAlgotrait is used as a base for join algorithms.
Functions§
- rewrite_
atoms - Rewrites
query.body: eachTerm::Atom("c<id>")becomes a fresh variableK<i>, with a new unary predicateConst_c<id>(K<i>)appended to the body.
Type Aliases§
- Const
Spec - Pairs a synthetic predicate name (e.g.
"Const_c42") with its dictionary ID. One entry is produced per rewritten atom occurrence.