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 <[email protected]> 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: [email protected] For additional commands, e-mail: [email protected]
