fix(precompute): count frequency sketch events - #481
Merged
Merged
Conversation
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.
Before
Bare CMS and CountSketch are the backend realizations for canonical
SketchQuery::PointCount, but raw precompute added each datapoint scalar as the sketch weight. Five observations with values[1000, -7, 42.5, 0, 9999]therefore produced a value sum instead of frequency 5. ASAPQuery fixed the CMS count-vs-sum distinction in ProjectASAP/ASAPQuery#665.After
This adapts the upstream fix to the current canonical Planner model: bare frequency sketches have
PointCountsemantics, while exact/value sums are different summary families.Verification
cargo fmt -p data_plane -- --checkcargo test -p data_plane precompute_engine::accumulator_factory::tests::bare_(2 passed)cargo test -p data_plane precompute_engine::(259 passed)The first local build attempt exhausted the worktree filesystem during linking; after removing only regenerated worktree
target/artifacts and using the repository shared target, the commands above passed.