Repository navigation
Bump datasketches-java 3.0.0 -> 6.1.1 and fix incompatible DoublesUnion API - #170
Merged
Merged
Conversation
…on API Bumps the datasketches-java dependency from 3.0.0 to 6.1.1 (pulls in datasketches-memory 3.0.2 transitively). The only source-incompatible change on the API surface used by the Beam fork (DistributionData is the sole consumer of the quantiles/memory API) is on DoublesUnion: 6.x renamed update(DoublesSketch) to union(DoublesSketch), while update(double) now adds a single value. Updated the two accumulator-merge call sites in combine(DistributionData) accordingly; merge semantics are unchanged. No other changes were required: - DoublesSketch.getQuantiles(double[]) still resolves via the default method on QuantilesDoublesAPI, which delegates to getQuantiles(double[], INCLUSIVE). INCLUSIVE reproduces the pre-4.0 (3.0.0) definition of rank, so percentile results are preserved. - DoublesSketchBuilder.setK/build, getN, toByteArray, UpdateDoublesSketch.heapify, and Memory.wrap are unchanged. Verified: runners:core-java compiles clean under ErrorProne -Werror; all DistributionDataTest cases pass on 6.1.1 (including the concurrency stress test and serialization/combine parity tests). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
yananhao12
approved these changes
Jul 29, 2026
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.
Summary
Bumps
datasketches-javafrom 3.0.0 → 6.1.1 (inBeamModulePlugin.groovy) and resolves the one source-incompatible API change it introduces.DistributionDatais the only consumer of the DataSketches quantiles/memory API in this fork. The single breaking change is onDoublesUnion:DoublesUnion.update(DoublesSketch)→union(DoublesSketch);update(double)now adds a single value.Updated the two accumulator-merge call sites in
combine(DistributionData)fromunion.update(...)tounion.union(...). Merge semantics are unchanged.Why nothing else changed
DoublesSketch.getQuantiles(double[])QuantilesDoublesAPI, which delegates togetQuantiles(double[], INCLUSIVE). Verified by decompiling the interface.INCLUSIVEreproduces the pre-4.0 (3.0.0) definition of rank, so percentile results are preserved — no code change and no behavioral change.DoublesSketchBuilder.setK(int).build()getN(),toByteArray()UpdateDoublesSketch.heapify(Memory)Memory.wrap(byte[])The
sdks/java/harnessshade block only relocates theorg.apache.datasketchespackage, which is version-agnostic.Testing
runners:core-javacompiles clean under ErrorProne-Werror.DistributionDataTestcases pass on 6.1.1, including the concurrency stress test (the AIOOBE regression guard) and the serialization /combineparity tests.Notes
This complements the datasketches concurrency fix in #169 (already merged) and moves the fork off the pinned 3.0.0 onto the current 6.x line.