lsm-tree-0.1.0.0: Log-structured merge-trees
Safe HaskellSafe-Inferred
LanguageGHC2021

Database.LSMTree.Internal.BloomFilterQuery1

Synopsis

Documentation

bloomQueries :: Vector (Bloom SerialisedKey) -> Vector SerialisedKey -> Vector RunIxKeyIx Source #

Perform a batch of bloom queries. The result is a tuple of indexes into the vector of runs and vector of keys respectively.

The result vector can be of variable length. The initial estimate is 2x the number of keys but this is grown if needed (using a doubling strategy).

data RunIxKeyIx where Source #

A RunIxKeyIx is a (compact) pair of a RunIx and a KeyIx.

We represent it as a 32bit word, using:

  • 16 bits for the run/filter index (MSB)
  • 16 bits for the key index (LSB)

Bundled Patterns

pattern RunIxKeyIx :: RunIx -> KeyIx -> RunIxKeyIx 

type RunIx = Int Source #

type KeyIx = Int Source #