You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by lc...@apache.org on 2018/01/24 23:13:50 UTC
[beam] 02/04: Small fix in SketchCoder
This is an automated email from the ASF dual-hosted git repository.
lcwik pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
commit eabc640294fc265221824b011c18c79179e4d699
Author: ArnaudFnr <ar...@gmail.com>
AuthorDate: Wed Dec 27 01:13:17 2017 +0100
Small fix in SketchCoder
---
.../org/apache/beam/sdk/extensions/sketching/SketchFrequencies.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sdks/java/extensions/sketching/src/main/java/org/apache/beam/sdk/extensions/sketching/SketchFrequencies.java b/sdks/java/extensions/sketching/src/main/java/org/apache/beam/sdk/extensions/sketching/SketchFrequencies.java
index 9872bcd..6508333 100644
--- a/sdks/java/extensions/sketching/src/main/java/org/apache/beam/sdk/extensions/sketching/SketchFrequencies.java
+++ b/sdks/java/extensions/sketching/src/main/java/org/apache/beam/sdk/extensions/sketching/SketchFrequencies.java
@@ -534,10 +534,10 @@ public final class SketchFrequencies {
throw new CoderException("cannot encode a null Count-min Sketch");
} else {
// 8L is for the sketch's size (long)
- // 4L * 2 is for depth and width (ints) in Sketch<T> and in the Count-Min sketch
+ // 4L * 4 is for depth and width (ints) in Sketch<T> and in the Count-Min sketch
// 8L * depth * (width + 1) is a factorization for the sizes of table (long[depth][width])
// and hashA (long[depth])
- return 8L + 4L * 4 + 8L * value.depth * (value.width + 1);
+ return 8L + 4L * 4 + 8L * value.getDepth() * (value.getWidth() + 1);
}
}
}
--
To stop receiving notification emails like this one, please contact
lcwik@apache.org.