Skip to content

Migrate asap-precompute-rs to the restructured sketchlib API - #435

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) out from under the sketches:: module and re-exports them at the crate root; the sketches:: module now holds the algorithmic sketch types. Updated the wrapper imports to the crate-root paths.
  • Populated the proto fields newly added to the sketch state messages: HyperLogLogState.registers_sparse (left unset — wrappers emit the dense register encoding) and KllState.offset/value_scale/residuals (left at off-defaults — wrappers emit the raw-f64 item representation). The emitted wire form is unchanged.
  • Compile-compat only; no wire/serialization behavior change.

Cross-repo dependency order

The asap_sketchlib crate-root MessagePackCodec re-export (ProjectASAP/asap_sketchlib#54) must merge first. Order:

  1. asap_sketchlib feat: matrix aggregation (aggregate_by + label_matchers) for KLL, HLL, DDSketch processors #54
  2. ASAPCollector (this PR)
  3. ASAPQuery-backend data_plane migration

Test plan

  • cargo check green for asap-precompute-rs
  • cargo test green (unit 43, api_surface 11, cross_language_parity 7, runtime 27, 0 failed)

🤖 Generated with Claude Code

asap_sketchlib moved its portable wire-format sketch DTOs (CountMinSketch,
CountSketch, DdSketch, HllSketch, HllVariant) out from under the
`sketches::` module and now re-exports them at the crate root, while the
`sketches::` module holds the algorithmic sketch types. Update the
wrapper imports to the crate-root paths.

Also populate the proto fields added to the sketch state messages:
HyperLogLogState gains `registers_sparse` (left unset — the wrappers
emit the dense register encoding) and KllState gains
`offset`/`value_scale`/`residuals` (left at off-defaults — the wrappers
emit the raw-f64 item representation). Both keep the existing wire form.

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

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