joinkit 0.1.0

Iterator adaptors for efficient SQL-like joins
Documentation

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.