Repository navigation
docs(asapv1): DDSketch has one encoding, carrying the negative store and zero count - #212
Merged
Merged
Conversation
…and zero count §3.8 gives DDSketch one payload of eight fields and metadata_version 1, whatever the sketch holds. The negative store and zero count are always present, empty when unused, and the decode rules cover both stores. Co-Authored-By: Claude Opus 5.5 <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.
Closes #186. Part of #179.
What the spec says
0x05 0x00) has one encoding:metadata_versionis1and the payload always has eight fields,[counts, offset, sum, min, max, negative_counts, negative_offset, zero_count].negative_counts/negative_offsetfollow the positive store's rules; an empty negative store sits atnegative_offset == 0.i32index span, and the checked totalsum(counts) + sum(negative_counts) + zero_count.min <= max; whensum(negative_counts) == 0andzero_count == 0, also0 < minandsum >= min.Choices beyond the issue text
metadata_versionis1, as for every other kind.max, the same order as today's signed payload.0, as the positive store is.Not in this PR
Rust and Go encoders and golden files change in #195. No DDSketch golden exists in
sketchlib-golden-bytesyet.Only
docs/asapv1_wire_format.mdchanges.🤖 Generated with Claude Code