Skip to main content

Module bloom

Module bloom 

Source
Expand description

Bloom filter for tag column filtering.

Provides a simple, self-contained bloom filter implementation using double-hashing (two independent FNV-1a hash functions) for tag-value membership testing in segment metadata. Enables segment-level predicate pushdown: if a queried tag value is definitely not in the bloom filter, the entire segment can be skipped without reading any column blocks.

§Design

  • ~10 bits per element for approximately 1% false positive rate
  • Double-hashing: h_i = h1 + i * h2 using two FNV-1a variants with different offset bases (matching chronix-index approach)
  • k=7 hash probes (optimal for 10 bits/element)
  • Serialized as a raw byte array (Vec<u8>)

Functions§

bloom_filter_build
Build a bloom filter from a set of string values.
bloom_filter_contains
Check if a bloom filter possibly contains a value.