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:30 UTC
[datasketches-java] 01/03: Fix Mikhails bug
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 df46f16bee1d11e5db84f146ebbde3237841060e
Author: Lee Rhodes <le...@users.noreply.github.com>
AuthorDate: Tue Oct 12 21:42:03 2021 -0400
Fix Mikhails bug
---
src/main/java/org/apache/datasketches/tuple/AnotB.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/datasketches/tuple/AnotB.java b/src/main/java/org/apache/datasketches/tuple/AnotB.java
index 1a355e2..2c0a1dd 100644
--- a/src/main/java/org/apache/datasketches/tuple/AnotB.java
+++ b/src/main/java/org/apache/datasketches/tuple/AnotB.java
@@ -294,10 +294,9 @@ public final class AnotB<S extends Summary> {
}
//Both skA & skB are not null
- if (skA.isEmpty()) { return skA.compact(); }
- if (skB.isEmpty()) { return skA.compact(); }
- //Both skA & skB are not empty
-
+ if (skA.getRetainedEntries() == 0) { return skA.compact(); }
+ if (skB.getRetainedEntries() == 0) { return skA.compact(); }
+ //Both skA & skB have valid retained entries, and are not empty
//Process A
final DataArrays<S> da = getDataArraysA(skA);
final long[] hashArrA = da.hashArr;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org