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 2026/09/26 23:16:57 UTC

(datasketches-java) 01/04: Fix BloomFilterTest.basicDifferenceTest retention threshold

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

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

commit a0b57e9fc237784f1605555513ec5b5e456b1f58
Author: Lee Rhodes <le...@users.noreply.github.com>
AuthorDate: Sat Sep 26 14:16:59 2026 -0700

    Fix BloomFilterTest.basicDifferenceTest retention threshold
    
    With 8192 bits, right's load was ~46.5%, so only ~4.4% of left-only
    items could survive difference(), far below the test's 25% threshold.
    Raise numBits to 65536 (~7.5% load, ~68% expected retention).
    
    Co-Authored-By: Claude Opus 5.5 <no...@anthropic.com>
---
 .../org/apache/datasketches/filters/bloomfilter/BloomFilterTest.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 class BloomFilterTest {
 
   @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);


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