kermit-algos
Join algorithms for the Kermit workspace. Currently implements the Leapfrog Triejoin — a worst-case-optimal multi-way join — generic over any data structure that implements TrieIterable.
Entry points
LeapfrogTriejoin— the algorithm'sJoinAlgoimplementation. Takes a parsedJoinQueryplus a map from predicate name to data structure reference, and returns an iterator over the join output.LeapfrogTriejoinIter— the lower-level iterator produced by the algorithm. Exposestriejoin_open/triejoin_upfor manual driving in tests.LeapfrogJoinIter— the inner intersection that powers each depth of the triejoin.JoinAlgorithm— CLI enum used by the binary to pick an algorithm at runtime.
Relationship to other crates
Depends on kermit-iters for iterator traits and kermit-parser for query ASTs. Accepts any relation implementing TrieIterable — in practice TreeTrie and ColumnTrie from kermit-ds.
See ARCHITECTURE.md for the overall query-evaluation flow and ARCHITECTURE.md#leapfrog-triejoin for a walkthrough of the algorithm as implemented here.
Extending
To add a new algorithm:
- Implement
JoinAlgo<DS>on a marker type. - Add a variant to
JoinAlgorithmand wire it up inkermit/src/main.rs.