diff --git a/pom.xml b/pom.xml index bdd818a48..40fa32fe6 100644 --- a/pom.xml +++ b/pom.xml @@ -146,9 +146,9 @@ under the License. ${testng.generate_java_files},${testng.check_java_files},${testng.check_cpp_files} ${testng.check_go_files},${testng.check_rust_files} - ${testng.check_CL_binaries}${testng.check_cpp_historicals} + ${testng.check_CL_binaries},${testng.check_cpp_historicals} - ${testng.check_java_cpp}${testng.check_go_rust}${testng.check_specials} + ${testng.check_java_cpp},${testng.check_go_rust},${testng.check_specials} ${project.basedir} false @@ -870,7 +870,7 @@ under the License. org.apache.maven.plugins maven-surefire-plugin - ${testng.check_CL_binary_files} + ${testng.check_CL_binaries} @@ -886,7 +886,7 @@ under the License. org.apache.maven.plugins maven-surefire-plugin - ${testng.check_cpp_historical_files} + ${testng.check_cpp_historicals} diff --git a/src/main/java/org/apache/datasketches/tdigest/TDigestDouble.java b/src/main/java/org/apache/datasketches/tdigest/TDigestDouble.java index 4cd4169e0..fa99c3d99 100644 --- a/src/main/java/org/apache/datasketches/tdigest/TDigestDouble.java +++ b/src/main/java/org/apache/datasketches/tdigest/TDigestDouble.java @@ -117,10 +117,10 @@ public void update(final double value) { */ public void merge(final TDigestDouble other) { if (other.isEmpty()) { return; } + Math.addExact(getTotalWeight(), other.getTotalWeight()); // Extreme centroid means are not the true min/max when those centroids have weight > 1. minValue_ = Math.min(minValue_, other.minValue_); maxValue_ = Math.max(maxValue_, other.maxValue_); - Math.addExact(getTotalWeight(), other.getTotalWeight()); final int num = numCentroids_ + numBuffered_ + other.numCentroids_ + other.numBuffered_; final double[] values = new double[num]; final long[] weights = new long[num]; diff --git a/src/main/java/org/apache/datasketches/tuple/CompactTupleSketch.java b/src/main/java/org/apache/datasketches/tuple/CompactTupleSketch.java index 030eae7e5..4c2ed8ef6 100644 --- a/src/main/java/org/apache/datasketches/tuple/CompactTupleSketch.java +++ b/src/main/java/org/apache/datasketches/tuple/CompactTupleSketch.java @@ -221,7 +221,7 @@ public byte[] toByteArray() { | (1 << Flags.IS_READ_ONLY.ordinal()) | (isEmpty() ? 1 << Flags.IS_EMPTY.ordinal() : 0) ); - ByteArrayUtil.putShortLE(bytes, offset, defaultSeedHash); + ByteArrayUtil.putShortLE(bytes, offset, isEmpty() ? 0 : defaultSeedHash); // empty image carries zero, as in theta offset += Short.BYTES; if (!isEmpty()) { if (!isSingleItem) { diff --git a/src/test/java/org/apache/datasketches/filters/bloomfilter/BloomFilterTest.java b/src/test/java/org/apache/datasketches/filters/bloomfilter/BloomFilterTest.java index f5483d897..4b234202c 100644 --- a/src/test/java/org/apache/datasketches/filters/bloomfilter/BloomFilterTest.java +++ b/src/test/java/org/apache/datasketches/filters/bloomfilter/BloomFilterTest.java @@ -295,7 +295,7 @@ public void basicIntersectionTest() { @Test public void basicDifferenceTest() { - final long numBits = 8192; + final long numBits = 65536; // keeps right's load low (~7.5%) so most left-only items survive final int numHashes = 5; final BloomFilter left = BloomFilterBuilder.createBySize(numBits, numHashes);