data_plane: consume packed HLL delta + CountMin hh_keys (align to asap_sketchlib main) - #350
Merged
Merged
Conversation
Align the backend's delta-apply with asap_sketchlib's updated wire format:
- HLL delta is now a varint-packed (index_delta, value) blob (was repeated
per-register sub-messages). Decode + apply via HllSketch::apply_delta_bytes
(single source of truth) instead of the vendored nested decode; vendored
hll_delta.proto updated to bytes packed_updates; HLL round-trip tests build
the packed blob.
- CountMinSketchDelta gained an hh_keys field upstream; pass an empty set on
the CountMin apply path (no TopK to rebuild here), mirroring CountSketch.
- Update the CMS/CountSketch zero-dims decode tests to assert the current
validate_sketch_dims message ('degenerate dims') surfaced by the bump.
DDSketch alignment (scalar-less wire) is already on main (#345/#346).
cargo build --workspace clean; cargo test -p data_plane --lib: 782 passed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Aligns
data_plane's sketch delta-apply with the currentasap_sketchlibwire format (the DDSketch scalar-less alignment already landed via #345/#346; this adds the remaining HLL + CountMin pieces). Delta transmission is OFF by default, so this only affects how an enabled delta frame is decoded.HLL — packed delta
The HLL delta wire format is now a varint-packed
(index_delta, value)blob (wasrepeated HLLRegisterUpdate). Both decode sites (HllSketchAccumulator::apply_proto_delta_bytesand the query reducer'sapply_hll_proto_delta) now delegate toHllSketch::apply_delta_bytes— single source of truth, no parallel decoder. Vendoredhll_delta.protoupdated tobytes packed_updates; HLL round-trip tests build the packed blob.CountMin — hh_keys
asap_sketchlib::CountMinSketchDeltagained anhh_keysfield (unifying with CountSketch). The CountMin apply path passes an empty set (no TopK to rebuild here), mirroring the existing CountSketch handling.Test alignment
The CMS/CountSketch
from_sketchlib_proto_byteszero-dims tests now assert the currentvalidate_sketch_dimsmessage ("degenerate dims").Verification
cargo build --workspaceclean;cargo test -p data_plane --lib: 782 passed, 0 failed (2 pre-existing#[ignore]d e2e tests untouched).Depends on asap_sketchlib#61 (packed HLL
apply_delta_bytes+CountMinSketchDelta.hh_keys), now merged to asap_sketchlib main.🤖 Generated with Claude Code