Skip to content

Bump datasketches-java 3.0.0 -> 6.1.1 and fix incompatible DoublesUnion API - #170

Merged
Zhangyx39 merged 1 commit into
li_trunkfrom
yixzhang/bump-datasketches-6.1.1
Jul 29, 2026
Merged

Zhangyx39 merged 1 commit into
li_trunkfrom
yixzhang/bump-datasketches-6.1.1

Conversation

@Zhangyx39

Copy link
Copy Markdown

Summary

Bumps datasketches-java from 3.0.0 → 6.1.1 (in BeamModulePlugin.groovy) and resolves the one source-incompatible API change it introduces.

DistributionData is the only consumer of the DataSketches quantiles/memory API in this fork. The single breaking change is on DoublesUnion:

  • 6.x renamed DoublesUnion.update(DoublesSketch) → union(DoublesSketch); update(double) now adds a single value.

Updated the two accumulator-merge call sites in combine(DistributionData) from union.update(...) to union.union(...). Merge semantics are unchanged.

Why nothing else changed

API used 6.1.1 status
DoublesSketch.getQuantiles(double[]) Still resolves via the default method on QuantilesDoublesAPI, which delegates to getQuantiles(double[], INCLUSIVE). Verified by decompiling the interface. INCLUSIVE reproduces 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() Unchanged
getN(), toByteArray() Unchanged
UpdateDoublesSketch.heapify(Memory) Unchanged
Memory.wrap(byte[]) Unchanged (datasketches-memory 3.0.2 resolves transitively)

The sdks/java/harness shade block only relocates the org.apache.datasketches package, which is version-agnostic.

Testing

  • runners:core-java compiles clean under ErrorProne -Werror.
  • All 8 DistributionDataTest cases pass on 6.1.1, including the concurrency stress test (the AIOOBE regression guard) and the serialization / combine parity tests.
  • Spotless passes.

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.

…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>
@Zhangyx39
Zhangyx39 merged commit 454429c into li_trunk Jul 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants