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 2022/12/10 00:37:22 UTC

[datasketches-java] branch fix_codeql_alerts created (now 12d1874c)

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

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


      at 12d1874c This fixes all of the "High", "Error", and "Warnings" issues detected by CodeQL. However, there were some that I classified as "Won't Fix" and "False Positive".  But I'm not sure if CodeQL will remember those markings.

This branch includes the following new commits:

     new 12d1874c This fixes all of the "High", "Error", and "Warnings" issues detected by CodeQL. However, there were some that I classified as "Won't Fix" and "False Positive".  But I'm not sure if CodeQL will remember those markings.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



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


[datasketches-java] 01/01: This fixes all of the "High", "Error", and "Warnings" issues detected by CodeQL. However, there were some that I classified as "Won't Fix" and "False Positive". But I'm not sure if CodeQL will remember those markings.

Posted by le...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 12d1874c4c3e05d74c43d544a810cea0726aaefa
Author: Lee Rhodes <le...@users.noreply.github.com>
AuthorDate: Fri Dec 9 16:37:00 2022 -0800

    This fixes all of the "High", "Error", and "Warnings" issues detected by
    CodeQL. However, there were some that I classified as "Won't Fix" and
    "False Positive".  But I'm not sure if CodeQL will remember those
    markings.
---
 .github/workflows/codeql.yml                       |  1 +
 .../java/org/apache/datasketches/common/Util.java  | 30 +++++++++++++++++++++-
 .../java/org/apache/datasketches/cpc/CpcUnion.java |  2 +-
 .../org/apache/datasketches/cpc/PreambleUtil.java  |  2 +-
 .../java/org/apache/datasketches/fdt/Group.java    | 14 ++++++----
 .../java/org/apache/datasketches/hll/HllUtil.java  |  2 +-
 .../sampling/ReservoirItemsSketch.java             |  2 +-
 .../sampling/ReservoirLongsSketch.java             |  2 +-
 .../datasketches/tuple/QuickSelectSketch.java      |  2 +-
 .../org/apache/datasketches/common/UtilTest.java   | 18 +++++++++++++
 .../datasketches/cpc/CpcCompressionTest.java       |  2 +-
 .../org/apache/datasketches/cpc/TestAllTest.java   |  2 +-
 .../apache/datasketches/frequencies/DistTest.java  |  4 +--
 .../org/apache/datasketches/hll/UnionTest.java     |  4 +--
 .../quantiles/CustomQuantilesTest.java             |  7 ++---
 .../quantiles/DirectUpdateDoublesSketchTest.java   |  2 +-
 .../quantiles/HeapCompactDoublesSketchTest.java    |  2 +-
 .../GenericInequalitySearchTest.java               | 28 ++++++++++----------
 .../quantilescommon/InequalitySearchTest.java      |  2 +-
 .../sampling/ReservoirLongsSketchTest.java         | 21 +++------------
 .../datasketches/theta/BackwardConversions.java    |  2 +-
 .../theta/ConcurrentHeapQuickSelectSketchTest.java | 30 ++++++++++------------
 .../theta/DirectQuickSelectSketchTest.java         | 27 +++++++++----------
 .../datasketches/theta/HeapAlphaSketchTest.java    | 20 +++++++--------
 .../theta/HeapQuickSelectSketchTest.java           | 20 +++++++--------
 25 files changed, 138 insertions(+), 110 deletions(-)

diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index edcce802..9faa687e 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -8,6 +8,7 @@ on:
     branches: [ 'master' ]
   schedule:
     - cron: '10 17 * * 4'
+  workflow_dispatch:
 
 jobs:
   analyze:
diff --git a/src/main/java/org/apache/datasketches/common/Util.java b/src/main/java/org/apache/datasketches/common/Util.java
index 44c02b6d..d333771c 100644
--- a/src/main/java/org/apache/datasketches/common/Util.java
+++ b/src/main/java/org/apache/datasketches/common/Util.java
@@ -136,6 +136,34 @@ public final class Util {
     return arr;
   }
 
+  //Byte array conversions
+
+  static long[] convertToLongArray(final byte[] byteArr, final boolean littleEndian) {
+    int len = byteArr.length;
+    long[] longArr = new long[len / 8 + (len % 8 != 0 ? 1 : 0)];
+    int off = 0;
+    int longArrIdx = 0;
+    while (off < len) {
+      int rem = Math.min(len - 1 - off, 7);
+      long tgt = 0;
+      if (littleEndian) {
+        for (int j = off + rem, k = 0; j >= off; --j, k++) {
+          tgt |= (byteArr[j] & 0XFFL) << (k * 8);
+        }
+      } else { //BE
+        for (int j = off + rem, k = rem; j >= off; --j, k--) {
+          tgt |= (byteArr[j] & 0XFFL) << (k * 8);
+        }
+      }
+      off += 8;
+      longArr[longArrIdx++] = tgt;
+    }
+    return longArr;
+  }
+
+
+
+
   //String Related
 
   /**
@@ -562,7 +590,7 @@ public final class Util {
     return pow(base, floor(logBaseOfX(base, x)));
   }
 
-  // Logrithm related
+  // Logarithm related
 
   /**
    * The log base 2 of the value
diff --git a/src/main/java/org/apache/datasketches/cpc/CpcUnion.java b/src/main/java/org/apache/datasketches/cpc/CpcUnion.java
index 72166df1..2cd7663b 100644
--- a/src/main/java/org/apache/datasketches/cpc/CpcUnion.java
+++ b/src/main/java/org/apache/datasketches/cpc/CpcUnion.java
@@ -298,7 +298,7 @@ public class CpcUnion {
     final int state = ((sourceFlavorOrd - 1) << 1) | ((union.bitMatrix != null) ? 1 : 0);
     switch (state) {
       case 0 : { //A: Sparse, bitMatrix == null, accumulator valid
-        if ((union.accumulator.getFlavor() == EMPTY) //lgtm [java/dereferenced-value-may-be-null]
+        if ((union.accumulator.getFlavor() == EMPTY)
             && (union.lgK == source.lgK)) {
           union.accumulator = source.copy();
           break;
diff --git a/src/main/java/org/apache/datasketches/cpc/PreambleUtil.java b/src/main/java/org/apache/datasketches/cpc/PreambleUtil.java
index 3c63bd7f..e3379f58 100644
--- a/src/main/java/org/apache/datasketches/cpc/PreambleUtil.java
+++ b/src/main/java/org/apache/datasketches/cpc/PreambleUtil.java
@@ -790,7 +790,7 @@ final class PreambleUtil {
     final long memCap = mem.getCapacity();
     final long expectedCap = offsetBytes + (4L * lengthInts);
     checkCapacity(memCap, expectedCap);
-    for (int i = 0; i < lengthInts; i++) {
+    for (long i = 0; i < lengthInts; i++) {
       sb.append(String.format(fmt, i, mem.getInt(offsetBytes + (4L * i)))).append(LS);
     }
   }
diff --git a/src/main/java/org/apache/datasketches/fdt/Group.java b/src/main/java/org/apache/datasketches/fdt/Group.java
index 90bde42d..0d676a99 100644
--- a/src/main/java/org/apache/datasketches/fdt/Group.java
+++ b/src/main/java/org/apache/datasketches/fdt/Group.java
@@ -21,8 +21,7 @@ package org.apache.datasketches.fdt;
 
 /**
  * Defines a Group from a Frequent Distinct Tuple query. This class is called internally during
- * post processing and is not inteded to be called by the user.
- * Note: this class has a natural ordering that is inconsistent with equals.
+ * post processing and is not intended to be called by the user.
  * @author Lee Rhodes
  */
 public class Group implements Comparable<Group> {
@@ -49,7 +48,7 @@ public class Group implements Comparable<Group> {
    * @param count the number of retained rows associated with this group
    * @param estimate the estimate of the original population associated with this group
    * @param ub the upper bound of the estimate
-   * @param lb the lower bound of the extimate
+   * @param lb the lower bound of the estimate
    * @param fraction the fraction of all retained rows of the sketch associated with this group
    * @param rse the estimated Relative Standard Error for this group.
    * @return return this
@@ -114,8 +113,6 @@ public class Group implements Comparable<Group> {
   }
 
   /**
-   * Note: this class has a natural ordering that is inconsistent with equals.
-   * Ignore FindBugs EQ_COMPARETO_USE_OBJECT_EQUALS warning.
    * @param that The Group to compare to
    */
   @Override
@@ -123,5 +120,12 @@ public class Group implements Comparable<Group> {
     return that.count - count; //decreasing
   }
 
+  @Override
+  public boolean equals(Object that) {
+    if (this == that) { return true; }
+    if (!(that instanceof Group)) { return false; }
+    return ((Group)that).count == count;
+  }
+
 }
 
diff --git a/src/main/java/org/apache/datasketches/hll/HllUtil.java b/src/main/java/org/apache/datasketches/hll/HllUtil.java
index 0a1ef518..939e5315 100644
--- a/src/main/java/org/apache/datasketches/hll/HllUtil.java
+++ b/src/main/java/org/apache/datasketches/hll/HllUtil.java
@@ -97,7 +97,7 @@ final class HllUtil {
   static CurMode checkPreamble(final Memory mem) {
     checkBounds(0, 8, mem.getCapacity()); //need min 8 bytes
     final int preInts = extractPreInts(mem);
-    checkBounds(0, preInts * Integer.BYTES, mem.getCapacity());
+    checkBounds(0, (long)preInts * Integer.BYTES, mem.getCapacity());
     final int serVer = extractSerVer(mem);
     final int famId = extractFamilyId(mem);
     final CurMode curMode = extractCurMode(mem);
diff --git a/src/main/java/org/apache/datasketches/sampling/ReservoirItemsSketch.java b/src/main/java/org/apache/datasketches/sampling/ReservoirItemsSketch.java
index f591f466..a00a2c09 100644
--- a/src/main/java/org/apache/datasketches/sampling/ReservoirItemsSketch.java
+++ b/src/main/java/org/apache/datasketches/sampling/ReservoirItemsSketch.java
@@ -517,7 +517,7 @@ public final class ReservoirItemsSketch<T> {
       return new SampleSubsetSummary(0.0, 0.0, 0.0, 0.0);
     }
 
-    final long numSamples = getNumSamples();
+    final int numSamples = getNumSamples();
     final double samplingRate = numSamples / (double) itemsSeen_;
     assert samplingRate >= 0.0;
     assert samplingRate <= 1.0;
diff --git a/src/main/java/org/apache/datasketches/sampling/ReservoirLongsSketch.java b/src/main/java/org/apache/datasketches/sampling/ReservoirLongsSketch.java
index 3b2e79c5..60d27750 100644
--- a/src/main/java/org/apache/datasketches/sampling/ReservoirLongsSketch.java
+++ b/src/main/java/org/apache/datasketches/sampling/ReservoirLongsSketch.java
@@ -444,7 +444,7 @@ public final class ReservoirLongsSketch {
       return new SampleSubsetSummary(0.0, 0.0, 0.0, 0.0);
     }
 
-    final long numSamples = getNumSamples();
+    final int numSamples = getNumSamples();
     final double samplingRate = numSamples / (double) itemsSeen_;
     assert samplingRate >= 0.0;
     assert samplingRate <= 1.0;
diff --git a/src/main/java/org/apache/datasketches/tuple/QuickSelectSketch.java b/src/main/java/org/apache/datasketches/tuple/QuickSelectSketch.java
index 6e6f1eaf..6146174a 100644
--- a/src/main/java/org/apache/datasketches/tuple/QuickSelectSketch.java
+++ b/src/main/java/org/apache/datasketches/tuple/QuickSelectSketch.java
@@ -192,7 +192,7 @@ class QuickSelectSketch<S extends Summary> extends Sketch<S> {
     lgCurrentCapacity_ = mem.getByte(offset++); //byte 6
     lgResizeFactor_ = mem.getByte(offset++); //byte 7
 
-    checkBounds(0, preambleLongs * 8, mem.getCapacity());
+    checkBounds(0, preambleLongs * 8L, mem.getCapacity());
     final boolean isInSamplingMode = (flags & 1 << Flags.IS_IN_SAMPLING_MODE.ordinal()) > 0;
     samplingProbability_ = isInSamplingMode ? mem.getFloat(offset) : 1f; //bytes 8 - 11
     if (isInSamplingMode) {
diff --git a/src/test/java/org/apache/datasketches/common/UtilTest.java b/src/test/java/org/apache/datasketches/common/UtilTest.java
index a0871dbb..09bd6aa1 100644
--- a/src/test/java/org/apache/datasketches/common/UtilTest.java
+++ b/src/test/java/org/apache/datasketches/common/UtilTest.java
@@ -32,6 +32,7 @@ import static org.apache.datasketches.common.Util.checkIfIntPowerOf2;
 import static org.apache.datasketches.common.Util.checkIfLongPowerOf2;
 import static org.apache.datasketches.common.Util.checkIfMultipleOf8AndGT0;
 import static org.apache.datasketches.common.Util.checkProbability;
+import static org.apache.datasketches.common.Util.convertToLongArray;
 import static org.apache.datasketches.common.Util.exactLog2OfInt;
 import static org.apache.datasketches.common.Util.exactLog2OfLong;
 import static org.apache.datasketches.common.Util.floorPowerBaseOfDouble;
@@ -434,6 +435,23 @@ public class UtilTest {
     } catch (final SketchesArgumentException e) { }
   }
 
+  @Test
+  static void checkConvertToLongArray() {
+    byte[] arr = {1,2,3,4,5,6,7,8,9,10,11,12};
+
+    long[] out = convertToLongArray(arr, false);
+    String s = org.apache.datasketches.common.Util.zeroPad(Long.toHexString(out[0]), 16);
+    assertEquals(s, "0807060504030201");
+    s = org.apache.datasketches.common.Util.zeroPad(Long.toHexString(out[1]), 16);
+    assertEquals(s, "000000000c0b0a09");
+
+    out = convertToLongArray(arr, true);
+    s = org.apache.datasketches.common.Util.zeroPad(Long.toHexString(out[0]), 16);
+    assertEquals(s, "0102030405060708");
+    s = org.apache.datasketches.common.Util.zeroPad(Long.toHexString(out[1]), 16);
+    assertEquals(s, "00000000090a0b0c");
+  }
+
   //Resources
 
   @Test
diff --git a/src/test/java/org/apache/datasketches/cpc/CpcCompressionTest.java b/src/test/java/org/apache/datasketches/cpc/CpcCompressionTest.java
index c8c85e37..9a33aa71 100644
--- a/src/test/java/org/apache/datasketches/cpc/CpcCompressionTest.java
+++ b/src/test/java/org/apache/datasketches/cpc/CpcCompressionTest.java
@@ -178,7 +178,7 @@ public class CpcCompressionTest {
     int bb; // numBaseBits
 
     for (bb = 0; bb <= 11; bb++) {
-      final Long numWordsWritten =
+      final long numWordsWritten =
         lowLevelCompressPairs(pairArray, numPairs, bb, compressedWords);
         println("numWordsWritten = " + numWordsWritten + ", bb = " + bb);
 
diff --git a/src/test/java/org/apache/datasketches/cpc/TestAllTest.java b/src/test/java/org/apache/datasketches/cpc/TestAllTest.java
index 7ef12f02..ce847fc3 100644
--- a/src/test/java/org/apache/datasketches/cpc/TestAllTest.java
+++ b/src/test/java/org/apache/datasketches/cpc/TestAllTest.java
@@ -57,7 +57,7 @@ public class TestAllTest {
     int len = 16;
     long[] arr = new long[len];
     Arrays.fill(arr, pat);
-    long trueCount = len * Long.bitCount(pat);
+    long trueCount = (long)len * Long.bitCount(pat);
     long testCount = BitMatrix.countCoupons(arr);
     assertEquals(testCount, trueCount);
   }
diff --git a/src/test/java/org/apache/datasketches/frequencies/DistTest.java b/src/test/java/org/apache/datasketches/frequencies/DistTest.java
index 0ce9fb20..d6d56da1 100644
--- a/src/test/java/org/apache/datasketches/frequencies/DistTest.java
+++ b/src/test/java/org/apache/datasketches/frequencies/DistTest.java
@@ -37,11 +37,11 @@ public class DistTest {
     // the zeta function, used by the below zipf function
     // (this is not often called from outside this library)
     // ... but have made it public now to speed things up
-    int i;
+    long i;
     double ans = 0.0;
 
     for (i = 1; i <= n; i++) {
-      ans += Math.pow(1. / i, theta);
+      ans += Math.pow(1.0 / i, theta);
     }
     return (ans);
   }
diff --git a/src/test/java/org/apache/datasketches/hll/UnionTest.java b/src/test/java/org/apache/datasketches/hll/UnionTest.java
index 29e15108..d3485ebc 100644
--- a/src/test/java/org/apache/datasketches/hll/UnionTest.java
+++ b/src/test/java/org/apache/datasketches/hll/UnionTest.java
@@ -437,7 +437,7 @@ public class UnionTest {
   public void checkUnionHeapifyRebuildAfterMerge() {
     int lgK = 12;
     //Build 2 sketches in HLL (dense) mode.
-    int u = (lgK < 8) ? 16 : 1 << (lgK - 3);
+    int u = (lgK < 8) ? 16 : 1 << (lgK - 3); //allows changing lgK above
     HllSketch sk1 = new HllSketch(lgK);
     HllSketch sk2 = new HllSketch(lgK);
     for (int i = 0; i < u; i++) {
@@ -467,7 +467,7 @@ public class UnionTest {
    WritableMemory wmem = WritableMemory.allocate(bytes);
    new Union(lgK, wmem); // result is unused, relying on side effect
    int trueCount = 0;
-   int delta = (lgK < 8) ? 16 : 1 << (lgK - 3);
+   int delta = (lgK < 8) ? 16 : 1 << (lgK - 3); //allows to vary lgK above
    for (int i = 0; i < 3; i++) {
     Union.writableWrap(wmem).update(buildSketch(trueCount, delta));
     trueCount += delta;
diff --git a/src/test/java/org/apache/datasketches/quantiles/CustomQuantilesTest.java b/src/test/java/org/apache/datasketches/quantiles/CustomQuantilesTest.java
index abe66bd3..44b1b0c2 100644
--- a/src/test/java/org/apache/datasketches/quantiles/CustomQuantilesTest.java
+++ b/src/test/java/org/apache/datasketches/quantiles/CustomQuantilesTest.java
@@ -19,7 +19,8 @@
 
 package org.apache.datasketches.quantiles;
 
-import static org.apache.datasketches.quantilescommon.LinearRanksAndQuantiles.*;
+import static org.apache.datasketches.quantilescommon.LinearRanksAndQuantiles.getTrueDoubleQuantile;
+import static org.apache.datasketches.quantilescommon.LinearRanksAndQuantiles.getTrueDoubleRank;
 import static org.apache.datasketches.quantilescommon.QuantileSearchCriteria.EXCLUSIVE;
 import static org.apache.datasketches.quantilescommon.QuantileSearchCriteria.INCLUSIVE;
 import static org.testng.Assert.assertEquals;
@@ -80,7 +81,7 @@ public class CustomQuantilesTest {
     println("  Q of the smallest rank > r. If r = 1.0 => null or NaN");
     printf("%12s%12s%12s\n", "Ranks",  "Quantiles", "CompRank");
     double inc = 1.0 / (2 * N);
-    for (int j = 0; j <= (2 * N); j++) {
+    for (long j = 0; j <= (2 * N); j++) {
       double nr = (j * inc);
       double q = sk.getQuantile(nr, EXCLUSIVE);
       double qTrue = getTrueDoubleQuantile(cumWtsArr, quantilesArr, nr, EXCLUSIVE);
@@ -105,7 +106,7 @@ public class CustomQuantilesTest {
     println("  Q of the smallest rank >= r.");
     printf("%12s%12s%12s\n", "Ranks", "Quantiles", "CompRank");
     inc = 1.0 / (2 * N);
-    for (int j = 0; j <= (2 * N); j++) {
+    for (long j = 0; j <= (2 * N); j++) {
       double nr = (j * inc);
       double q = sk.getQuantile(nr, INCLUSIVE);
       double qTrue = getTrueDoubleQuantile(cumWtsArr, quantilesArr, nr, INCLUSIVE);
diff --git a/src/test/java/org/apache/datasketches/quantiles/DirectUpdateDoublesSketchTest.java b/src/test/java/org/apache/datasketches/quantiles/DirectUpdateDoublesSketchTest.java
index 6335a844..f87409e3 100644
--- a/src/test/java/org/apache/datasketches/quantiles/DirectUpdateDoublesSketchTest.java
+++ b/src/test/java/org/apache/datasketches/quantiles/DirectUpdateDoublesSketchTest.java
@@ -296,7 +296,7 @@ public class DirectUpdateDoublesSketchTest {
 
   static UpdateDoublesSketch buildAndLoadDQS(int k, long n, int startV) {
     UpdateDoublesSketch qs = buildDQS(k, n);
-    for (int i=1; i<=n; i++) {
+    for (long i = 1; i <= n; i++) {
       qs.update(startV + i);
     }
     return qs;
diff --git a/src/test/java/org/apache/datasketches/quantiles/HeapCompactDoublesSketchTest.java b/src/test/java/org/apache/datasketches/quantiles/HeapCompactDoublesSketchTest.java
index fa958b74..0581c44a 100644
--- a/src/test/java/org/apache/datasketches/quantiles/HeapCompactDoublesSketchTest.java
+++ b/src/test/java/org/apache/datasketches/quantiles/HeapCompactDoublesSketchTest.java
@@ -94,7 +94,7 @@ public class HeapCompactDoublesSketchTest {
     // modify to make v2, clear compact flag, and insert a -1 in the middle of the base buffer
     PreambleUtil.insertSerVer(mem, 2);
     PreambleUtil.insertFlags(mem, 0);
-    final long tgtAddr = COMBINED_BUFFER + ((Double.BYTES * k) / 2);
+    final long tgtAddr = COMBINED_BUFFER + ((Double.BYTES * (long)k) / 2);
     mem.putDouble(tgtAddr, -1.0);
     assert mem.getDouble(tgtAddr - Double.BYTES) > mem.getDouble(tgtAddr);
 
diff --git a/src/test/java/org/apache/datasketches/quantilescommon/GenericInequalitySearchTest.java b/src/test/java/org/apache/datasketches/quantilescommon/GenericInequalitySearchTest.java
index e039f76b..ee949593 100644
--- a/src/test/java/org/apache/datasketches/quantilescommon/GenericInequalitySearchTest.java
+++ b/src/test/java/org/apache/datasketches/quantilescommon/GenericInequalitySearchTest.java
@@ -43,7 +43,7 @@ public class GenericInequalitySearchTest {
 
   private final Comparator<Float> comparator = Comparator.naturalOrder();
 
-
+  //CodeQL may complain about boxed values, but Java Generics require objects.
   private static Float[] buildRandFloatArr(final int len) {
     final Float[] arr = new Float[len];
     Float v = 1.0f;
@@ -54,18 +54,18 @@ public class GenericInequalitySearchTest {
     return arr;
   }
 
-  @Test //visual testing only
-  //@SuppressWarnings("unused")
-  private static void checkBuildRandArr() {
-    final int len = 10;
-    for (int i = 0; i < 10; i++) {
-      final Float[] tarr = buildRandFloatArr(len);
-      for (int j = 0; j < len; j++) {
-        printf("%4.1f,", tarr[j]);
-      }
-      println("");
-    }
-  }
+//  @Test //visual testing only
+//  //@SuppressWarnings("unused")
+//  private static void viewBuildRandArr() {
+//    final int len = 10;
+//    for (int i = 0; i < 10; i++) {
+//      final Float[] tarr = buildRandFloatArr(len);
+//      for (int j = 0; j < len; j++) {
+//        printf("%4.1f,", tarr[j]);
+//      }
+//      println("");
+//    }
+//  }
 
   @Test
   public void checkBinSearchFltLimits() {
@@ -287,7 +287,7 @@ public class GenericInequalitySearchTest {
     return "";
   }
 
-  private final static boolean enablePrinting = false;
+  private final static boolean enablePrinting = true;
 
   /**
    * @param format the format
diff --git a/src/test/java/org/apache/datasketches/quantilescommon/InequalitySearchTest.java b/src/test/java/org/apache/datasketches/quantilescommon/InequalitySearchTest.java
index 121494c8..3a74d228 100644
--- a/src/test/java/org/apache/datasketches/quantilescommon/InequalitySearchTest.java
+++ b/src/test/java/org/apache/datasketches/quantilescommon/InequalitySearchTest.java
@@ -64,7 +64,7 @@ public class InequalitySearchTest {
     long v = 1L;
     for (int i = 0; i < len; i++) {
       arr[i] = v;
-      v += 2 * randDelta();
+      v += 2L * randDelta();
     }
     return arr;
   }
diff --git a/src/test/java/org/apache/datasketches/sampling/ReservoirLongsSketchTest.java b/src/test/java/org/apache/datasketches/sampling/ReservoirLongsSketchTest.java
index 56c0ea04..799e008b 100644
--- a/src/test/java/org/apache/datasketches/sampling/ReservoirLongsSketchTest.java
+++ b/src/test/java/org/apache/datasketches/sampling/ReservoirLongsSketchTest.java
@@ -32,15 +32,14 @@ import static org.testng.Assert.fail;
 import java.io.PrintWriter;
 import java.io.StringWriter;
 
-import org.testng.annotations.Test;
-
-import org.apache.datasketches.memory.Memory;
-import org.apache.datasketches.memory.WritableMemory;
 import org.apache.datasketches.common.Family;
 import org.apache.datasketches.common.ResizeFactor;
 import org.apache.datasketches.common.SketchesArgumentException;
 import org.apache.datasketches.common.SketchesException;
 import org.apache.datasketches.common.SketchesStateException;
+import org.apache.datasketches.memory.Memory;
+import org.apache.datasketches.memory.WritableMemory;
+import org.testng.annotations.Test;
 
 public class ReservoirLongsSketchTest {
   private static final double EPS = 1e-8;
@@ -532,20 +531,6 @@ public class ReservoirLongsSketchTest {
     }
   }
 
-  static String printBytesAsLongs(final byte[] byteArr) {
-    final StringBuilder sb = new StringBuilder();
-    for (int i = 0; i < byteArr.length; i += 8) {
-      for (int j = i + 7; j >= i; --j) {
-        final String str = Integer.toHexString(byteArr[j] & 0XFF);
-        sb.append(org.apache.datasketches.common.Util.zeroPad(str, 2));
-      }
-      sb.append(org.apache.datasketches.common.Util.LS);
-
-    }
-
-    return sb.toString();
-  }
-
   /**
    * Wrapper around System.out.println() allowing a simple way to disable logging in tests
    *
diff --git a/src/test/java/org/apache/datasketches/theta/BackwardConversions.java b/src/test/java/org/apache/datasketches/theta/BackwardConversions.java
index 80b5d55c..18cd6e86 100644
--- a/src/test/java/org/apache/datasketches/theta/BackwardConversions.java
+++ b/src/test/java/org/apache/datasketches/theta/BackwardConversions.java
@@ -226,7 +226,7 @@ public class BackwardConversions {
       wmem.putLong(16, skV3.getThetaLong());
     }
     final long[] arr = skV3.getCache();
-    wmem.putLongArray(preLongs * 8, arr, 0, entries);
+    wmem.putLongArray(preLongs * 8L, arr, 0, entries);
     return wmem;
   }
 }
diff --git a/src/test/java/org/apache/datasketches/theta/ConcurrentHeapQuickSelectSketchTest.java b/src/test/java/org/apache/datasketches/theta/ConcurrentHeapQuickSelectSketchTest.java
index 1ca0da8f..2261edc3 100644
--- a/src/test/java/org/apache/datasketches/theta/ConcurrentHeapQuickSelectSketchTest.java
+++ b/src/test/java/org/apache/datasketches/theta/ConcurrentHeapQuickSelectSketchTest.java
@@ -173,8 +173,8 @@ public class ConcurrentHeapQuickSelectSketchTest {
     assertEquals(local2.getEstimate(), u, 0.0);
     assertEquals(local2.getLowerBound(2), u, 0.0);
     assertEquals(local2.getUpperBound(2), u, 0.0);
-    assertEquals(local2.isEmpty(), false);
-    assertEquals(local2.isEstimationMode(), false);
+    assertFalse(local2.isEmpty());
+    assertFalse(local2.isEstimationMode());
     assertEquals(local2.getResizeFactor(), local.getResizeFactor());
     local2.toString(true, true, 8, true);
   }
@@ -197,7 +197,7 @@ public class ConcurrentHeapQuickSelectSketchTest {
     double localEst = local.getEstimate();
     double localLB  = local.getLowerBound(2);
     double localUB  = local.getUpperBound(2);
-    assertEquals(local.isEstimationMode(), true);
+    assertTrue(local.isEstimationMode());
     byte[]  serArr = shared.toByteArray();
 
     Memory srcMem = Memory.wrap(serArr);
@@ -210,8 +210,8 @@ public class ConcurrentHeapQuickSelectSketchTest {
     assertEquals(local2.getEstimate(), localEst);
     assertEquals(local2.getLowerBound(2), localLB);
     assertEquals(local2.getUpperBound(2), localUB);
-    assertEquals(local2.isEmpty(), false);
-    assertEquals(local2.isEstimationMode(), true);
+    assertFalse(local2.isEmpty());
+    assertTrue(local2.isEstimationMode());
     assertEquals(local2.getResizeFactor(), local.getResizeFactor());
   }
 
@@ -219,8 +219,7 @@ public class ConcurrentHeapQuickSelectSketchTest {
   public void checkHeapifyMemoryEstimating() {
     int lgK = 9;
     int k = 1 << lgK;
-    int u = 2*k;
-    boolean estimating = (u > k);
+    int u = 2*k; //thus estimating
 
     SharedLocal sl = new SharedLocal(lgK);
     UpdateSketch local = sl.local;
@@ -234,7 +233,7 @@ public class ConcurrentHeapQuickSelectSketchTest {
     double localEst = local.getEstimate();
     double localLB  = local.getLowerBound(2);
     double localUB  = local.getUpperBound(2);
-    assertEquals(local.isEstimationMode(), estimating);
+    assertTrue(local.isEstimationMode());
     assertFalse(local.isDirect());
     assertFalse(local.hasMemory());
 
@@ -252,15 +251,14 @@ public class ConcurrentHeapQuickSelectSketchTest {
     assertEquals(local2.getLowerBound(2), localLB);
     assertEquals(local2.getUpperBound(2), localUB);
     assertEquals(local2.isEmpty(), false);
-    assertEquals(local2.isEstimationMode(), estimating);
+    assertTrue(local2.isEstimationMode());
   }
 
   @Test
   public void checkHQStoCompactForms() {
     int lgK = 9;
     int k = 1 << lgK;
-    int u = 4*k;
-    boolean estimating = (u > k);
+    int u = 4*k; //thus estimating
 
     int maxBytes = (k << 4) + (Family.QUICKSELECT.getMinPreLongs() << 3);
 
@@ -286,7 +284,7 @@ public class ConcurrentHeapQuickSelectSketchTest {
     int sharedBytes = shared.getCurrentBytes();
     int sharedCompBytes = shared.getCompactBytes();
     assertEquals(sharedBytes, maxBytes);
-    assertEquals(local.isEstimationMode(), estimating);
+    assertTrue(local.isEstimationMode());
 
     CompactSketch comp1, comp2, comp3, comp4;
 
@@ -296,7 +294,7 @@ public class ConcurrentHeapQuickSelectSketchTest {
     assertEquals(comp1.getLowerBound(2), localLB);
     assertEquals(comp1.getUpperBound(2), localUB);
     assertEquals(comp1.isEmpty(), false);
-    assertEquals(comp1.isEstimationMode(), estimating);
+    assertTrue(comp1.isEstimationMode());
     assertEquals(comp1.getCompactBytes(), sharedCompBytes);
     assertEquals(comp1.getClass().getSimpleName(), "HeapCompactSketch");
 
@@ -306,7 +304,7 @@ public class ConcurrentHeapQuickSelectSketchTest {
     assertEquals(comp2.getLowerBound(2), localLB);
     assertEquals(comp2.getUpperBound(2), localUB);
     assertEquals(comp2.isEmpty(), false);
-    assertEquals(comp2.isEstimationMode(), estimating);
+    assertTrue(comp2.isEstimationMode());
     assertEquals(comp2.getCompactBytes(), sharedCompBytes);
     assertEquals(comp2.getClass().getSimpleName(), "HeapCompactSketch");
 
@@ -319,7 +317,7 @@ public class ConcurrentHeapQuickSelectSketchTest {
     assertEquals(comp3.getLowerBound(2), localLB);
     assertEquals(comp3.getUpperBound(2), localUB);
     assertEquals(comp3.isEmpty(), false);
-    assertEquals(comp3.isEstimationMode(), estimating);
+    assertTrue(comp3.isEstimationMode());
     assertEquals(comp3.getCompactBytes(), sharedCompBytes);
     assertEquals(comp3.getClass().getSimpleName(), "DirectCompactSketch");
 
@@ -330,7 +328,7 @@ public class ConcurrentHeapQuickSelectSketchTest {
     assertEquals(comp4.getLowerBound(2), localLB);
     assertEquals(comp4.getUpperBound(2), localUB);
     assertEquals(comp4.isEmpty(), false);
-    assertEquals(comp4.isEstimationMode(), estimating);
+    assertTrue(comp4.isEstimationMode());
     assertEquals(comp4.getCompactBytes(), sharedCompBytes);
     assertEquals(comp4.getClass().getSimpleName(), "DirectCompactSketch");
     comp4.toString(false, true, 0, false);
diff --git a/src/test/java/org/apache/datasketches/theta/DirectQuickSelectSketchTest.java b/src/test/java/org/apache/datasketches/theta/DirectQuickSelectSketchTest.java
index 802b897f..5191c7c6 100644
--- a/src/test/java/org/apache/datasketches/theta/DirectQuickSelectSketchTest.java
+++ b/src/test/java/org/apache/datasketches/theta/DirectQuickSelectSketchTest.java
@@ -122,8 +122,7 @@ public class DirectQuickSelectSketchTest {
   @Test
   public void checkHeapifyMemoryEstimating() {
     int k = 512;
-    int u = 2*k;
-    boolean estimating = (u > k);
+    int u = 2*k; //thus estimating
 
     try (WritableHandle h = makeNativeMemory(k)) {
       WritableMemory mem = h.getWritable();
@@ -134,7 +133,7 @@ public class DirectQuickSelectSketchTest {
       double sk1est = sk1.getEstimate();
       double sk1lb  = sk1.getLowerBound(2);
       double sk1ub  = sk1.getUpperBound(2);
-      assertEquals(sk1.isEstimationMode(), estimating);
+      assertTrue(sk1.isEstimationMode());
       assertEquals(sk1.getClass().getSimpleName(), "DirectQuickSelectSketch");
       int curCount1 = sk1.getRetainedEntries(true);
       assertTrue(sk1.isDirect());
@@ -148,7 +147,7 @@ public class DirectQuickSelectSketchTest {
       assertEquals(sk2.getLowerBound(2), sk1lb);
       assertEquals(sk2.getUpperBound(2), sk1ub);
       assertEquals(sk2.isEmpty(), false);
-      assertEquals(sk2.isEstimationMode(), estimating);
+      assertTrue(sk2.isEstimationMode());
       assertEquals(sk2.getClass().getSimpleName(), "HeapQuickSelectSketch");
       int curCount2 = sk2.getRetainedEntries(true);
       long[] cache = sk2.getCache();
@@ -288,8 +287,7 @@ public class DirectQuickSelectSketchTest {
   @Test
   public void checkWrapMemoryEst() {
     int k = 512;
-    int u = 2*k;
-    boolean estimating = (u > k);
+    int u = 2*k; //thus estimating
 
     try (WritableHandle h = makeNativeMemory(k)) {
       WritableMemory mem = h.getWritable();
@@ -299,7 +297,7 @@ public class DirectQuickSelectSketchTest {
       double sk1est = sk1.getEstimate();
       double sk1lb  = sk1.getLowerBound(2);
       double sk1ub  = sk1.getUpperBound(2);
-      assertEquals(sk1.isEstimationMode(), estimating);
+      assertTrue(sk1.isEstimationMode());
 
       Sketch sk2 = Sketch.wrap(mem);
 
@@ -307,7 +305,7 @@ public class DirectQuickSelectSketchTest {
       assertEquals(sk2.getLowerBound(2), sk1lb);
       assertEquals(sk2.getUpperBound(2), sk1ub);
       assertEquals(sk2.isEmpty(), false);
-      assertEquals(sk2.isEstimationMode(), estimating);
+      assertTrue(sk2.isEstimationMode());
     } catch (final Exception e) {
       throw new RuntimeException(e);
     }
@@ -316,8 +314,7 @@ public class DirectQuickSelectSketchTest {
   @Test
   public void checkDQStoCompactForms() {
     int k = 512;
-    int u = 4*k;
-    boolean estimating = (u > k);
+    int u = 4*k; //thus estimating
     try (WritableHandle h = makeNativeMemory(k)) {
       WritableMemory mem = h.getWritable();
 
@@ -338,7 +335,7 @@ public class DirectQuickSelectSketchTest {
       double uskEst = usk.getEstimate();
       double uskLB  = usk.getLowerBound(2);
       double uskUB  = usk.getUpperBound(2);
-      assertEquals(usk.isEstimationMode(), estimating);
+      assertTrue(usk.isEstimationMode());
 
       CompactSketch csk;
 
@@ -347,7 +344,7 @@ public class DirectQuickSelectSketchTest {
       assertEquals(csk.getLowerBound(2), uskLB);
       assertEquals(csk.getUpperBound(2), uskUB);
       assertEquals(csk.isEmpty(), false);
-      assertEquals(csk.isEstimationMode(), estimating);
+      assertTrue(csk.isEstimationMode());
       assertEquals(csk.getClass().getSimpleName(), "HeapCompactSketch");
 
       csk = usk.compact(true, null);
@@ -355,7 +352,7 @@ public class DirectQuickSelectSketchTest {
       assertEquals(csk.getLowerBound(2), uskLB);
       assertEquals(csk.getUpperBound(2), uskUB);
       assertEquals(csk.isEmpty(), false);
-      assertEquals(csk.isEstimationMode(), estimating);
+      assertTrue(csk.isEstimationMode());
       assertEquals(csk.getClass().getSimpleName(), "HeapCompactSketch");
 
       int bytes = usk.getCompactBytes();
@@ -368,7 +365,7 @@ public class DirectQuickSelectSketchTest {
       assertEquals(csk.getLowerBound(2), uskLB);
       assertEquals(csk.getUpperBound(2), uskUB);
       assertEquals(csk.isEmpty(), false);
-      assertEquals(csk.isEstimationMode(), estimating);
+      assertTrue(csk.isEstimationMode());
       assertEquals(csk.getClass().getSimpleName(), "DirectCompactSketch");
 
       mem2.clear();
@@ -377,7 +374,7 @@ public class DirectQuickSelectSketchTest {
       assertEquals(csk.getLowerBound(2), uskLB);
       assertEquals(csk.getUpperBound(2), uskUB);
       assertEquals(csk.isEmpty(), false);
-      assertEquals(csk.isEstimationMode(), estimating);
+      assertTrue(csk.isEstimationMode());
       assertEquals(csk.getClass().getSimpleName(), "DirectCompactSketch");
       csk.toString(false, true, 0, false);
     } catch (final Exception e) {
diff --git a/src/test/java/org/apache/datasketches/theta/HeapAlphaSketchTest.java b/src/test/java/org/apache/datasketches/theta/HeapAlphaSketchTest.java
index f245b470..8682020e 100644
--- a/src/test/java/org/apache/datasketches/theta/HeapAlphaSketchTest.java
+++ b/src/test/java/org/apache/datasketches/theta/HeapAlphaSketchTest.java
@@ -185,9 +185,8 @@ public class HeapAlphaSketchTest {
   @Test
   public void checkHeapifyMemoryEstimating() {
     int k = 512;
-    int u = 2*k;
+    int u = 2*k; //thus estimating
     long seed = ThetaUtil.DEFAULT_UPDATE_SEED;
-    boolean estimating = (u > k);
     //int maxBytes = (k << 4) + (Family.ALPHA.getLowPreLongs());
 
     UpdateSketch sk1 = UpdateSketch.builder().setFamily(fam_).setSeed(seed)
@@ -200,7 +199,7 @@ public class HeapAlphaSketchTest {
     double sk1est = sk1.getEstimate();
     double sk1lb  = sk1.getLowerBound(2);
     double sk1ub  = sk1.getUpperBound(2);
-    assertEquals(sk1.isEstimationMode(), estimating);
+    assertTrue(sk1.isEstimationMode());
 
     byte[] byteArray = sk1.toByteArray();
     Memory mem = Memory.wrap(byteArray);
@@ -211,15 +210,14 @@ public class HeapAlphaSketchTest {
     assertEquals(sk2.getLowerBound(2), sk1lb);
     assertEquals(sk2.getUpperBound(2), sk1ub);
     assertEquals(sk2.isEmpty(), false);
-    assertEquals(sk2.isEstimationMode(), estimating);
+    assertTrue(sk2.isEstimationMode());
     assertEquals(sk2.getClass().getSimpleName(), sk1.getClass().getSimpleName());
   }
 
   @Test
   public void checkAlphaToCompactForms() {
     int k = 512;
-    int u = 4*k;
-    boolean estimating = (u > k);
+    int u = 4*k; //thus estimating
 
     UpdateSketch usk = UpdateSketch.builder().setFamily(fam_).setNominalEntries(k).build();
     HeapAlphaSketch sk1 = (HeapAlphaSketch)usk; //for internal checks
@@ -233,7 +231,7 @@ public class HeapAlphaSketchTest {
 
     //Alpha is more accurate, and size is a statistical variable about k
     // so cannot be directly compared to the compact forms
-    assertEquals(usk.isEstimationMode(), estimating);
+    assertTrue(usk.isEstimationMode());
 
     CompactSketch comp1, comp2, comp3, comp4;
 
@@ -249,7 +247,7 @@ public class HeapAlphaSketchTest {
     assertEquals(comp1bytes, (comp1curCount << 3) + (Family.COMPACT.getMaxPreLongs() << 3));
 
     assertEquals(comp1.isEmpty(), false);
-    assertEquals(comp1.isEstimationMode(), estimating);
+    assertTrue(comp1.isEstimationMode());
     assertEquals(comp1.getClass().getSimpleName(), "HeapCompactSketch");
 
     comp2 = usk.compact(true,  null);
@@ -258,7 +256,7 @@ public class HeapAlphaSketchTest {
     assertEquals(comp2.getLowerBound(2), comp1lb);
     assertEquals(comp2.getUpperBound(2), comp1ub);
     assertEquals(comp2.isEmpty(), false);
-    assertEquals(comp2.isEstimationMode(), estimating);
+    assertTrue(comp2.isEstimationMode());
     assertEquals(comp1bytes, comp2.getCompactBytes());
     assertEquals(comp1curCount, comp2.getRetainedEntries(true));
     assertEquals(comp2.getClass().getSimpleName(), "HeapCompactSketch");
@@ -275,7 +273,7 @@ public class HeapAlphaSketchTest {
     assertEquals(comp3.getLowerBound(2), comp1lb);
     assertEquals(comp3.getUpperBound(2), comp1ub);
     assertEquals(comp3.isEmpty(), false);
-    assertEquals(comp3.isEstimationMode(), estimating);
+    assertTrue(comp3.isEstimationMode());
     assertEquals(comp1bytes, comp3.getCompactBytes());
     assertEquals(comp1curCount, comp3.getRetainedEntries(true));
     assertEquals(comp3.getClass().getSimpleName(), "DirectCompactSketch");
@@ -287,7 +285,7 @@ public class HeapAlphaSketchTest {
     assertEquals(comp4.getLowerBound(2), comp1lb);
     assertEquals(comp4.getUpperBound(2), comp1ub);
     assertEquals(comp4.isEmpty(), false);
-    assertEquals(comp4.isEstimationMode(), estimating);
+    assertTrue(comp4.isEstimationMode());
     assertEquals(comp1bytes, comp4.getCompactBytes());
     assertEquals(comp1curCount, comp4.getRetainedEntries(true));
     assertEquals(comp4.getClass().getSimpleName(), "DirectCompactSketch");
diff --git a/src/test/java/org/apache/datasketches/theta/HeapQuickSelectSketchTest.java b/src/test/java/org/apache/datasketches/theta/HeapQuickSelectSketchTest.java
index 55be006a..6cf4c365 100644
--- a/src/test/java/org/apache/datasketches/theta/HeapQuickSelectSketchTest.java
+++ b/src/test/java/org/apache/datasketches/theta/HeapQuickSelectSketchTest.java
@@ -179,9 +179,8 @@ public class HeapQuickSelectSketchTest {
   @Test
   public void checkHeapifyMemoryEstimating() {
     int k = 512;
-    int u = 2*k;
+    int u = 2*k; //thus estimating
     long seed = ThetaUtil.DEFAULT_UPDATE_SEED;
-    boolean estimating = (u > k);
     UpdateSketch sk1 = UpdateSketch.builder().setFamily(fam_).setSeed(seed).setNominalEntries(k).build();
 
     for (int i=0; i<u; i++) {
@@ -191,7 +190,7 @@ public class HeapQuickSelectSketchTest {
     double sk1est = sk1.getEstimate();
     double sk1lb  = sk1.getLowerBound(2);
     double sk1ub  = sk1.getUpperBound(2);
-    assertEquals(sk1.isEstimationMode(), estimating);
+    assertTrue(sk1.isEstimationMode());
 
     byte[] byteArray = sk1.toByteArray();
     Memory mem = Memory.wrap(byteArray);
@@ -202,15 +201,14 @@ public class HeapQuickSelectSketchTest {
     assertEquals(sk2.getLowerBound(2), sk1lb);
     assertEquals(sk2.getUpperBound(2), sk1ub);
     assertEquals(sk2.isEmpty(), false);
-    assertEquals(sk2.isEstimationMode(), estimating);
+    assertTrue(sk2.isEstimationMode());
     assertEquals(sk2.getClass().getSimpleName(), sk1.getClass().getSimpleName());
   }
 
   @Test
   public void checkHQStoCompactForms() {
     int k = 512;
-    int u = 4*k;
-    boolean estimating = (u > k);
+    int u = 4*k; //thus estimating
 
     //boolean compact = false;
     int maxBytes = (k << 4) + (Family.QUICKSELECT.getMinPreLongs() << 3);
@@ -237,7 +235,7 @@ public class HeapQuickSelectSketchTest {
     int uskBytes = usk.getCurrentBytes();    //size stored as UpdateSketch
     int uskCompBytes = usk.getCompactBytes(); //size stored as CompactSketch
     assertEquals(uskBytes, maxBytes);
-    assertEquals(usk.isEstimationMode(), estimating);
+    assertTrue(usk.isEstimationMode());
 
     CompactSketch comp1, comp2, comp3, comp4;
 
@@ -247,7 +245,7 @@ public class HeapQuickSelectSketchTest {
     assertEquals(comp1.getLowerBound(2), uskLB);
     assertEquals(comp1.getUpperBound(2), uskUB);
     assertEquals(comp1.isEmpty(), false);
-    assertEquals(comp1.isEstimationMode(), estimating);
+    assertTrue(comp1.isEstimationMode());
     assertEquals(comp1.getCompactBytes(), uskCompBytes);
     assertEquals(comp1.getClass().getSimpleName(), "HeapCompactSketch");
 
@@ -257,7 +255,7 @@ public class HeapQuickSelectSketchTest {
     assertEquals(comp2.getLowerBound(2), uskLB);
     assertEquals(comp2.getUpperBound(2), uskUB);
     assertEquals(comp2.isEmpty(), false);
-    assertEquals(comp2.isEstimationMode(), estimating);
+    assertTrue(comp2.isEstimationMode());
     assertEquals(comp2.getCompactBytes(), uskCompBytes);
     assertEquals(comp2.getClass().getSimpleName(), "HeapCompactSketch");
 
@@ -270,7 +268,7 @@ public class HeapQuickSelectSketchTest {
     assertEquals(comp3.getLowerBound(2), uskLB);
     assertEquals(comp3.getUpperBound(2), uskUB);
     assertEquals(comp3.isEmpty(), false);
-    assertEquals(comp3.isEstimationMode(), estimating);
+    assertTrue(comp3.isEstimationMode());
     assertEquals(comp3.getCompactBytes(), uskCompBytes);
     assertEquals(comp3.getClass().getSimpleName(), "DirectCompactSketch");
 
@@ -281,7 +279,7 @@ public class HeapQuickSelectSketchTest {
     assertEquals(comp4.getLowerBound(2), uskLB);
     assertEquals(comp4.getUpperBound(2), uskUB);
     assertEquals(comp4.isEmpty(), false);
-    assertEquals(comp4.isEstimationMode(), estimating);
+    assertTrue(comp4.isEstimationMode());
     assertEquals(comp4.getCompactBytes(), uskCompBytes);
     assertEquals(comp4.getClass().getSimpleName(), "DirectCompactSketch");
     comp4.toString(false, true, 0, false);


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