You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by le...@apache.org on 2021/10/18 19:59:31 UTC

[datasketches-java] 02/03: Fix Mikhail's Bug # 2

This is an automated email from the ASF dual-hosted git repository.

leerho pushed a commit to branch FixMikhailsBug
in repository https://gitbox.apache.org/repos/asf/datasketches-java.git

commit 4273a53550cfed65a482320d1769ee26e8e13288
Author: Lee Rhodes <le...@users.noreply.github.com>
AuthorDate: Tue Oct 12 21:45:53 2021 -0400

    Fix Mikhail's Bug # 2
---
 src/main/java/org/apache/datasketches/tuple/AnotB.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/datasketches/tuple/AnotB.java b/src/main/java/org/apache/datasketches/tuple/AnotB.java
index 2c0a1dd..5dadfdf 100644
--- a/src/main/java/org/apache/datasketches/tuple/AnotB.java
+++ b/src/main/java/org/apache/datasketches/tuple/AnotB.java
@@ -240,8 +240,8 @@ public final class AnotB<S extends Summary> {
     if (skA == null || skB == null) {
       throw new SketchesArgumentException("Neither argument may be null");
     }
-    if (skA.isEmpty()) { return skA.compact(); }
-    if (skB.isEmpty()) { return skA.compact(); }
+    if (skA.getRetainedEntries() == 0) { return skA.compact(); }
+    if (skB.getRetainedEntries() == 0) { return skA.compact(); }
     //Both skA & skB are not empty
 
     //Process A

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org