Expand description
Joinkit provides iterator adaptors for efficient SQL-like joins.
§Strategies
There are two join strategies, which fit different scenarios:
- Hash Join - a shorter data stream is loaded entirely into memory (
HashMap
), while the longer can be arbitrarily large and is matched againstHashMap
sequentially. The greatest advantage is that data do not need to be sorted and it has amortized O(n) complexity, therefore it is very efficient. This is the right choice if data is not sorted and the smaller stream fits into memory. - Merge Join - the data streams must be sorted, but can be both arbitrarily large. This is the right choice if the data is already sorted, as in this case it is slightly more efficient than Hash Join.
To use the iterator adaptors in this crate, import Joinkit trait
:
use joinkit::Joinkit;
The crate contains also 2 binaries hjoin
and mjoin
, which can be used to perform Hash Join
and Merge Join
on command line.
Modules§
- This module contains various utilities/helper functions
Structs§
- See
hash_join_full_outer()
for the description and examples. - See
hash_join_inner()
for the description and examples. - See
hash_join_left_excl()
for the description and examples. - See
hash_join_left_outer()
for the description and examples. - See
hash_join_right_excl()
for the description and examples. - See
hash_join_right_outer()
for the description and examples. - See
merge_join_full_outer_by()
for the description and examples. - See
merge_join_inner_by()
for the description and examples. - See
merge_join_left_excl_by()
for the description and examples. - See
merge_join_left_outer_by()
for the description and examples.
Enums§
- A value yielded by
merge_join
andhash_join
outer iterators. Contains one or two values, depending on which input iterator is exhausted.
Traits§
- Trait
Joinkit
provides the extra iterator adaptors for efficient SQL-like joins.