1mod fold;
2mod fold_from;
3mod multiset;
4mod reduce;
5mod set;
67pub use fold::HalfJoinStateFold;
8pub use fold_from::HalfJoinStateFoldFrom;
9pub use multiset::HalfMultisetJoinState;
10pub use reduce::HalfJoinStateReduce;
11pub use set::HalfSetJoinState;
12use smallvec::SmallVec;
1314pub trait HalfJoinState<Key, ValBuild, ValProbe> {
15/// Insert a key value pair into the join state, currently this is always inserting into a hash table
16 /// If the key-value pair exists then it is implementation defined what happens, usually either two copies are stored or only one copy is stored.
17fn build(&mut self, k: Key, v: &ValBuild) -> bool;
1819/// This function does the actual joining part of the join. It looks up a key in the local join state and creates matches
20 /// The first match is return directly to the caller, and any additional matches are stored internally to be retrieved later with `pop_match`
21fn probe(&mut self, k: &Key, v: &ValProbe) -> Option<(Key, ValProbe, ValBuild)>;
2223/// If there are any stored matches from previous calls to probe then this function will remove them one at a time and return it.
24fn pop_match(&mut self) -> Option<(Key, ValProbe, ValBuild)>;
25fn len(&self) -> usize;
26fn is_empty(&self) -> bool {
27self.len() == 0
28}
29fn iter(&self) -> std::collections::hash_map::Iter<'_, Key, SmallVec<[ValBuild; 1]>>;
30fn full_probe(&self, k: &Key) -> std::slice::Iter<'_, ValBuild>;
31}