Skip to content

feat: add SketchEnvelope codec helpers for KLL and DDSketch - #163

Open
zzylol wants to merge 1 commit into
mainfrom
feat/sketch-envelope-codec
Open

zzylol wants to merge 1 commit into
mainfrom
feat/sketch-envelope-codec

Conversation

@zzylol

@zzylol zzylol commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Before this PR

The SketchEnvelope decoding and encoding helpers (envelope_state, ddsketch_state, reconstruct_ddsketch, kll_state, encode_ddsketch, encode_kll) lived in the ASAPPlanner crate asap_sketch_codec, and both ASAPPlanner and ASAPQuery-backend depended on it.

After this PR

The helpers live in sketchlib as asap_sketchlib::proto::envelope, with unchanged names and signatures, so callers only change the import path. ASAPPlanner no longer needs the codec (ProjectASAP/ASAPPlanner#473), and Backend will import it from sketchlib. No new dependencies.

Validation: cargo fmt --all -- --check, cargo clippy --workspace --all-targets -- -D warnings (all four CI feature sets), cargo doc with -D warnings, and cargo test --all-features --locked pass, including 7 new tests in proto::envelope.

🤖 Generated with Claude Code

Downstream crates (ASAPPlanner, ASAPQuery-backend) decode the protobuf
SketchEnvelope for KLL and DDSketch states. Host these helpers next to the
sketch definitions instead of in a separate ASAPPlanner crate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant