Add support for CountMinSketch to increment counter by a given number - #1
Closed
ruslan-dzhumakaliev wants to merge 3 commits into
Closed
Add support for CountMinSketch to increment counter by a given number#1ruslan-dzhumakaliev wants to merge 3 commits into
ruslan-dzhumakaliev wants to merge 3 commits into
Conversation
SEARCH-3451: add support for CountMinSketch to increment counter by a given number
This was referenced Sep 10, 2026
jhurliman
added a commit
that referenced
this pull request
Sep 10, 2026
Stacked on #3 (`release/streamcount-validation`), which is stacked on #2. Completes the remaining public declarations and distributed-package validation, and prepares version 2.0.0. Declarations cover every root export and the existing CountMinSketch, HyperLogLog, MinHeap and PRNG deep imports. Tests install the tarball independently, exercise CommonJS/ESM, and compile positive/negative NodeNext and Node16 TypeScript consumers. The package includes its format/migration documentation. Tests run before publishing; no automatic publishing is configured. Validation: 37 tests pass locally, including the signed-minimum hash regression and all parent serialization/estimator tests. CI installs the development dependencies on Node 22/24/26 and adds a separate Node 6 runtime-floor smoke test. Removes the obsolete Travis matrix identified by the review of #2. npm publication and merging are not performed by this PR. Stacked follow-up: #6 adds validated weighted increments, superseding #1. Merge this PR before #6.
jhurliman
added a commit
that referenced
this pull request
Sep 10, 2026
Stacked on #4. Supersedes #1's weighted-increment proposal, originally contributed by Ruslan Dzhumakaliev, with `increment(key, incrementBy = 1)` and public TypeScript declarations. Accept nonnegative uint32 integer weights; zero is a no-op, and invalid weights or counter overflow reject before mutation. Raise all selected buckets below the new minimum rather than only the old minimum buckets. For example, buckets 5 and 7 become 15 and 15 after +10, matching ten unit conservative updates; the original proposal produced 15 and 7 while reporting 15. Add collision-heavy comparisons against repeated unit updates, top-k checks, uint32 boundary/atomicity checks, legacy/CMS2 roundtrips, installed TypeScript consumer coverage and a Node 6 weighted-update smoke check. Document that weighted observations do not implement full distributed sketch merging or recover keys omitted from workers' top-k lists. Validation: all 44 tests pass locally. CI covers Node 22/24/26 and the Node 6 runtime floor. No merge or publication is performed; #1 can be closed as superseded once this replacement is accepted.
Owner
|
Functionality implemented via #6 thank you for your contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This new functionality serves the purpose of performing count-min sketch computation in distributed environment where output of multiple workers/mappers (map/reduce) needs to be merged into and aggregated centrally by reducer