Skip to content

chore: update Go snapshots to include HLL compact flag fix - #10

Merged
freakyzoidberg merged 1 commit into
mainfrom
bump-go-snapshots-for-go-issue-185
Sep 29, 2026
Merged

freakyzoidberg merged 1 commit into
mainfrom
bump-go-snapshots-for-go-issue-185

Conversation

@freakyzoidberg

Copy link
Copy Markdown
Member

What

Move the Go snapshot pin from ad31bdd to 757a485 (the merge of apache/datasketches-go#180) and regenerate serialization/go/snapshots.

Why

Fixes the byte mismatch reported in apache/datasketches-go#185. At ad31bdd, Go's ToCompactSlice() for HLL_6 and HLL_8 did not set the compact flag, so preamble byte 5 was 0x00 where C++ and current Java write 0x08. apache/datasketches-go#180 fixed this, following apache/datasketches-java@9a488f9.

757a485 is used instead of Go main because the Go snapshot generator on main currently fails in the theta and tuple packages: since apache/datasketches-go#181, updates that theta legitimately screens out are asserted as errors. With that fixed, main generates the same deterministic snapshots as 757a485.

Snapshot changes

  • 8 deterministic changes: hll6_n{1000,10000,100000,1000000}_go.sk and hll8_n{1000,10000,100000,1000000}_go.sk differ only at byte 5 (0x00 → 0x08).
  • 9 added: aos_multikey_n*_go.sk and aos_unicode_go.sk. The Go generator already produced these at the previous pin, but they were never added when 9438efd removed the old aos_multi_key_* and aos_unicode_strings names. The new names match the C++ and Java snapshots.
  • 43 probabilistic snapshots regenerated: bloom filter, REQ, reservoir and VarOpt.

Checks run locally

  • mise run tck -- snapshots check go: the file set and all deterministic snapshots reproduce; only probabilistic snapshots differ.
  • mise run check: passes.
  • datasketches-java HllSketchCrossLanguageTest (all test groups), using the C++ and Go snapshots from this branch: 7/7 pass, so all 24 HLL snapshots are byte-identical across C++, Go and Java. With the snapshots from datasketches-java's currently pinned TCK revision, checkBinaries2 and checkBinaries3 fail as reported in HLL6 Binary differences between C++ vs Go and Java vs Go. datasketches-go#185.

Follow-up

For datasketches-java's cross-language tests to pick this up, TCK_REVISION in tools/download_serialization_test_data.sh (currently d363b12) needs to move to this change once merged.

🤖 Generated with Claude Code

Move the Go snapshot pin from ad31bdd to 757a485, the merge of
apache/datasketches-go#180, and regenerate the Go snapshots. HLL_6 and
HLL_8 compact images now set the compact flag like C++ and Java, which
fixes the byte mismatch reported in apache/datasketches-go#185.

757a485 is used instead of main because the Go snapshot generator on
main currently fails in the theta and tuple packages.

The regeneration also adds the aos_multikey and aos_unicode Go
snapshots, which the generator already produced at the previous pin but
which were missing from the corpus.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@freakyzoidberg
freakyzoidberg merged commit 454f163 into main Sep 29, 2026
1 check passed
@freakyzoidberg
freakyzoidberg deleted the bump-go-snapshots-for-go-issue-185 branch September 29, 2026 09:43
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.

2 participants