Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Database.LSMTree.Internal.BloomFilterQuery1
Synopsis
- bloomQueries :: Vector (Bloom SerialisedKey) -> Vector SerialisedKey -> Vector RunIxKeyIx
- data RunIxKeyIx where
- pattern RunIxKeyIx :: RunIx -> KeyIx -> RunIxKeyIx
- type RunIx = Int
- type KeyIx = Int
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 |