Repository navigation
density_sketch: generate serialization snapshots under -DGENERATE=true - #588
Merged
Merged
Conversation
Adds density_sketch_serialize_for_java.cpp, built only with GENERATE like
the other sketches' generators. It writes density_float_n*_cpp.sk and
density_double_n*_cpp.sk for n = 0, 1, 10, 100, 1000 and 10000, from the
same inputs as the datasketches-rust generator (k = 10, dim = 3, the point
{x, sqrt(x), -x} for x = 0 .. n-1), so each C++ snapshot has a Rust
counterpart with the same name.
Closes #584
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Coverage Report for CI Build 44605601942Coverage decreased (-0.01%) to 96.877%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions2 previously-covered lines in 1 file lost coverage.
Coverage Stats
💛 - Coveralls |
tisonkun
approved these changes
Nov 19, 2026
tisonkun
left a comment
Member
There was a problem hiding this comment.
I verified that Rust can deserialize all 12 C++ density sketch snapshots and reserialize each one to exactly the original bytes.
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 #584.
Adds
density/test/density_sketch_serialize_for_java.cpp, built only with-DGENERATE=truelike the other sketches' generators. It writesdensity_float_n{N}_cpp.skanddensity_double_n{N}_cpp.skfor N = 0, 1, 10, 100, 1000 and 10000.The inputs are the same as in the datasketches-rust generator (
datagen/src/density.rs): k = 10, dim = 3, and the point{x, sqrt(x), -x}for x = 0 .. n-1. So each C++ snapshot has a Rust counterpart with the same name.Checked locally:
std::shuffle, whose draws depend on the standard library.Follow-up in datasketches-tck once this merges: mark the C++
density_snapshots with n >= 100 as unstable, as it does for Rust's, and re-pin C++.🤖 Generated with Claude Code