MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / bloom_custom_params_functional

Function bloom_custom_params_functional

nodedb-columnar/src/predicate.rs:701–712  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

699 /// for bit-position calculations — not the default BLOOM_BITS_DEFAULT/K.
700 #[test]
701 fn bloom_custom_params_functional() {
702 let bloom = build_bloom_with_params(&["alpha", "beta", "gamma"], 7, 8192);
703 assert!(bloom_may_contain(&bloom, "alpha"));
704 assert!(bloom_may_contain(&bloom, "beta"));
705 assert!(bloom_may_contain(&bloom, "gamma"));
706
707 // A default-params filter built from the same values should give the
708 // same membership results but is a different object (different m).
709 let default_bloom = build_bloom(&["alpha", "beta", "gamma"]);
710 assert_eq!(default_bloom.k, BLOOM_K_DEFAULT);
711 assert_eq!(default_bloom.m, BLOOM_BITS_DEFAULT);
712 }
713
714 // ── i64 predicate pushdown correctness ────────────────────────────
715

Callers

nothing calls this directly

Calls 2

build_bloom_with_paramsFunction · 0.85
build_bloomFunction · 0.85

Tested by

no test coverage detected