leerho commented on a change in pull request #369:
URL: https://github.com/apache/datasketches-java/pull/369#discussion_r733053253



##########
File path: src/main/java/org/apache/datasketches/theta/AnotBimpl.java
##########
@@ -119,17 +121,22 @@ public CompactSketch aNotB(final Sketch skA, final Sketch 
skB, final boolean dst
     }
     //Both skA & skB are not null
 
+    final long minThetaLong = Math.min(skA.getThetaLong(), skB.getThetaLong());
+
     if (skA.isEmpty()) { return skA.compact(dstOrdered, dstMem); }
+    //A is not Empty
     checkSeedHashes(skA.getSeedHash(), seedHash_);
 
-    if (skB.isEmpty()) { return skA.compact(dstOrdered, dstMem); }
+    if (skB.isEmpty() && skB.getRetainedEntries() == 0) {
+      return skA.compact(dstOrdered, dstMem);
+   }

Review comment:
       Good catch, and you are correct.  Thank you for finding this.  This is a 
redundant check that I inserted while debugging.  I will remove it.   I will 
answer your other questions with some more extensive documentation, still being 
developed. :)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to