Skip to content

asapv1: DDSketch kinds 05 01 / 05 81; 05 00 / 05 80 retired - #106

Merged
zzylol merged 1 commit into
mainfrom
ddsketch/kind-0501
Oct 29, 2026
Merged

zzylol merged 1 commit into
mainfrom
ddsketch/kind-0501

Conversation

@zzylol

@zzylol zzylol commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

Part of ProjectASAP/asap_sketchlib#250. Mirrors the registry change in ProjectASAP/asap_sketchlib#252. Base: main.

Why

asap_sketchlib moves DDSketch to kind 05 01 (bucket stores and zero count, with no sum / min / max) and its delta to 05 81. The retired 05 00 / 05 80 still decode. Go's main has no DDSketch ASAPv1 codec (that is #90), but its registry and golden check have to know the new ids. Otherwise TestEveryFixtureIsWellFormed fails once the golden submodule carries the ddsketch_buckets_* fixtures.

What

  • KindDDSketch = 05 01 and KindDDSketchDelta = 05 81 (they were 05 00 / 05 80).
  • New KindDDSketchWithScalars (05 00, "DDSketch with scalars") and KindDDSketchWithScalarsDelta (05 80), both registered with a payload because decoders accept them.
  • New KindCMSSpaceSaving (1e 00) and KindCSSpaceSaving (1f 00), Rust's CountMinSketchWithSpaceSaving and CountSketchWithSpaceSaving. The golden submodule already carries their fixtures, and leaving them out fails the same test.
  • asapv1_golden moves from cf56579 to 08440a1 (ddsketch: fixtures for the buckets-only kinds 05 01 / 05 81 sketchlib-golden-bytes#4). That span includes the delta, admission and seed-derivation fixtures.
  • The registry grows from 45 to 49 ids, 40 of them with a payload. Most of the kind.go diff is gofmt realignment.

Verification

  • Failing first: with only the submodule bumped, TestEveryFixtureIsWellFormed failed on 05 01, 05 81, 1e 00 and 1f 00.
  • go test ./wire/...: pass (TestRegistry, TestEveryFixtureIsWellFormed). go test ./sketches/DDSketch/... ./sketch_framework/...: pass. go vet ./wire/...: clean.

Merge order

  1. ddsketch: fixtures for the buckets-only kinds 05 01 / 05 81 sketchlib-golden-bytes#4.
  2. The Go main registry PR (branch ddsketch/kind-0501).
  3. feat(ddsketch)!: ASAPv1 codec with signed values; drop the protobuf, msgpack, delta and gob formats #90 (asapv1-only/ddsketch) rebased onto Go main, taking main's wire/asapv1/kind.go (the registry / kindEntry shape). That brings in 05 01 / 05 81 / 05 00 / 05 80 and the delta kinds.
  4. The codec branch (ddsketch/buckets-0501) restacked on the rebased feat(ddsketch)!: ASAPv1 codec with signed values; drop the protobuf, msgpack, delta and gob formats #90, with its kind.go / kind_test.go hunks dropped.

Limitations

🤖 Generated with Claude Code

The ASAPv1 registry follows asap_sketchlib: DDSketch's state is now kind
05 01 (bucket stores and zero count, no sum / min / max) and its delta
05 81. The retired 05 00 ("DDSketch with scalars") and its delta 05 80
stay registered with a payload, since decoders still accept them.

Also registers 1e 00 (CMSSpaceSaving) and 1f 00 (CSSpaceSaving), whose
fixtures the golden submodule already carries, and points asapv1_golden
at the commit with the ddsketch_buckets_* fixtures (08440a1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zzylol zzylol added the enhancement New feature or request label Oct 28, 2026
@zzylol
zzylol marked this pull request as ready for review October 29, 2026 00:46
@zzylol
zzylol merged commit 90b6c2a into main Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant