Crate joinkit

Source
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 against HashMap 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§

Enums§

  • A value yielded by merge_join and hash_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.