{
  "aliases": [
    "CQF"
  ],
  "status": "research",
  "advantages": [],
  "limitations": [],
  "related": [
    "quotient-filter",
    "counting-bloom-filter",
    "bloom-filter"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-10",
  "citations": [
    {
      "id": "cqf-paper",
      "title": "Pandey, Bender, Johnson and Patro. A General-Purpose Counting Filter: Making Every Bit Count. SIGMOD 2017, 775-787, sections 3-4. DOI: 10.1145/3035918.3035963.",
      "url": "https://users.cs.utah.edu/~pandey/courses/cs6968/spring23/papers/cqf.pdf",
      "accessed": "2026-11-02"
    },
    {
      "id": "cqf-code",
      "title": "CQF author implementation, commit 68939f587b0f33f8c45be4f0e2a18e12bffa9fa6: hash modes and update/query API.",
      "url": "https://github.com/saltsystemslab/cqf/tree/68939f587b0f33f8c45be4f0e2a18e12bffa9fa6",
      "accessed": "2026-11-03"
    },
    {
      "id": "hesela-cqf",
      "title": "Hesela. Quotient filters: exact fingerprints, approximate keys. Native source checks and replay files.",
      "url": "https://hesela.com/analyses/bloom-filters-lsm-read-cost/#quotient-counts",
      "accessed": "2026-11-02"
    }
  ],
  "provenance": [
    "Paper mechanism and native author-library execution are distinguished; no throughput, persistence, concurrency or FPR benchmark."
  ],
  "slug": "counting-quotient-filter",
  "term": "Counting quotient filter",
  "definition": "A counting quotient filter is a quotient-filter variant that encodes fingerprint multiplicities with variable-sized counters and rank-and-select metadata.",
  "note": "The design packs counters into remainder slots rather than storing a separate copy for every duplicate. Its approximate counts can overestimate a key's true multiplicity when distinct keys share a fingerprint. [cqf-paper]\n\nWith the tested default-hash mode, 5 copies of one key and 2 of a colliding key return 7 for either key, including after a resize. Deletion needs an exact outstanding-insertion history: a positive approximate count alone is insufficient. This is a deliberately selected native contract test, not a measured error rate. [hesela-cqf]\n\nThe pinned API also offers invertible hashing for an appropriately bounded key domain; that is a different contract from compressing arbitrary keys. [cqf-code]\n\nThe pinned qf_delete_key_value reads the approximate count and removes that whole fingerprint/value count. In default-hash mode this does not isolate one original key from another colliding key. Use a decrement bounded by the intended key's known outstanding insertions; this qualification is source-derived, not another native test. [cqf-code]"
}
