Skip to content

Commit 454429c

Browse files
authored
Merge pull request #170 from linkedin/yixzhang/bump-datasketches-6.1.1
Bump datasketches-java 3.0.0 -> 6.1.1 and fix incompatible DoublesUnion API
2 parents e749b62 + 92f5809 commit 454429c

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ class BeamModulePlugin implements Plugin<Project> {
587587
commons_lang3 : "org.apache.commons:commons-lang3:3.9",
588588
commons_logging : "commons-logging:commons-logging:1.2",
589589
commons_math3 : "org.apache.commons:commons-math3:3.6.1",
590-
datasketches : "org.apache.datasketches:datasketches-java:3.0.0",
590+
datasketches : "org.apache.datasketches:datasketches-java:6.1.1",
591591
dbcp2 : "org.apache.commons:commons-dbcp2:$dbcp2_version",
592592
error_prone_annotations : "com.google.errorprone:error_prone_annotations:$errorprone_version",
593593
flogger_system_backend : "com.google.flogger:flogger-system-backend:0.7.3",

‎runners/core-java/src/main/java/org/apache/beam/runners/core/metrics/DistributionData.java‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,10 @@ public DistributionData combine(DistributionData other) {
247247
try {
248248
if (sketch.isPresent() && otherSketch.isPresent() && sketch.get().getN() > 0) {
249249
final DoublesUnion union = new DoublesUnionBuilder().build();
250-
union.update(sketch.get());
251-
union.update(otherSketch.get());
250+
// datasketches 6.x renamed DoublesUnion.update(DoublesSketch) to union(DoublesSketch);
251+
// update(double) now adds a single value. Semantics of the merge are unchanged.
252+
union.union(sketch.get());
253+
union.union(otherSketch.get());
252254
sketch = Optional.of(union.getResult());
253255
} else if (otherSketch.isPresent()) {
254256
sketch = otherSketch;

0 commit comments

Comments
 (0)