Skip to content

Migrate data_plane to the restructured sketchlib API - #334

Merged
zzylol merged 1 commit into
mainfrom
migrate/sketchlib-api
May 25, 2026
Merged

zzylol merged 1 commit into
mainfrom
migrate/sketchlib-api

Conversation

@zzylol

@zzylol zzylol commented May 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • asap_sketchlib relocated its portable wire-format sketch DTOs (CountMinSketch, CountSketch, DdSketch, HllSketch, HllVariant, KllSketch, CountMinSketchWithHeap, CmsHeapItem, HydraKllSketch) out from under the sketches::* submodules and re-exports them at the crate root. The MessagePack serde methods also moved onto the MessagePackCodec trait (to_msgpack / from_msgpack, replacing the inherent serialize_msgpack / deserialize_msgpack).
  • Updated the sketch accumulators, ingest path, query decoders/reducers, and their tests/benches/examples to the new crate-root paths; imported the MessagePackCodec trait where the serde methods are called; renamed the serde calls.
  • Populated the new sketch-state proto fields (HyperLogLogState.registers_sparse, KllState.offset/value_scale/residuals) at off-defaults so the emitted wire form is unchanged.
  • Compile-compat only; no wire/serialization or query behavior change.

Cross-repo dependency order

Merge last — depends on both upstream PRs:

  1. asap_sketchlib (crate-root MessagePackCodec re-export) — Re-export MessagePackCodec at the crate root asap_sketchlib#54
  2. ASAPCollector asap-precompute-rs migration — Migrate asap-precompute-rs to the restructured sketchlib API ASAPCollector#435
  3. ASAPQuery-backend (this PR)

Test plan

  • cargo check --bin data_plane green
  • cargo check --tests -p data_plane green (lib tests + all integration tests + benches + examples)

🤖 Generated with Claude Code

asap_sketchlib relocated its portable wire-format sketch DTOs
(CountMinSketch, CountSketch, DdSketch, HllSketch, HllVariant, KllSketch,
CountMinSketchWithHeap, CmsHeapItem, HydraKllSketch) out from under the
`sketches::*` submodules and now re-exports them at the crate root. The
MessagePack serde methods also moved onto the MessagePackCodec trait
(`to_msgpack` / `from_msgpack`, replacing the old inherent
`serialize_msgpack` / `deserialize_msgpack`).

Update the sketch accumulators, ingest path, query decoders/reducers,
and their tests/benches/examples to the new crate-root paths, import the
MessagePackCodec trait where the serde methods are called, and rename the
serde calls. Also populate the new sketch-state proto fields
(HyperLogLogState.registers_sparse, KllState.offset/value_scale/residuals)
at their off-defaults so the emitted wire form is unchanged.

Compile-compat only; no wire/serialization or query behavior change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zzylol
zzylol merged commit b8c3ee8 into main May 25, 2026
@zzylol
zzylol deleted the migrate/sketchlib-api branch July 17, 2026 20:06
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