Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[COLLECTIONS-843] Implement Layered Bloom filter #402

Merged
merged 54 commits into from
Dec 22, 2023
Merged
Changes from 2 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
36beec4
Adjusted tests to handle bloom filter implementations that utilized
Claudenw Jun 21, 2023
5be49b7
cleaned up spacing
Claudenw Jun 27, 2023
3a1a8c8
fixed indent
Claudenw Jun 21, 2023
a6b5e81
updated for layered testing
Claudenw Jun 27, 2023
301041b
removed spaces
Claudenw Jun 27, 2023
7631528
fixed merge issue
Claudenw Jun 27, 2023
680d2bb
initial checkin
Claudenw Jun 27, 2023
ee2cdff
cleaned up tests
Claudenw Jun 29, 2023
d581e99
fixed timing on test
Claudenw Jun 29, 2023
0dddfa2
fixed formatting
Claudenw Jun 29, 2023
756e88f
added javadoc
Claudenw Jun 29, 2023
ccf430f
fixed typos
Claudenw Jun 29, 2023
b8fe880
removed blank lines
Claudenw Jun 29, 2023
a6d4f46
fixed javadocs
Claudenw Jun 30, 2023
4ab19a6
Fix Javadoc
garydgregory Jun 30, 2023
ad257e1
Add Javadoc @since 4.5
garydgregory Jun 30, 2023
d5e17e8
Add Javadoc @since 4.5
garydgregory Jun 30, 2023
97ca57e
updated tests and added BloomFilterProducer code
Claudenw Jun 30, 2023
cb09fbe
Merge branch 'apache:master' into layered_filter
Claudenw Jun 30, 2023
0123c3f
Merge branch 'layered_filter' of github.com:Claudenw/commons-collecti…
Claudenw Jun 30, 2023
1a647d5
Cleaned up javadoc and BiPredicate<BloomFilter,BloomFilter> processing
Claudenw Jun 30, 2023
62eba66
fixed javadoc issues
Claudenw Jun 30, 2023
4e7ab0b
fixed typography issue
Claudenw Jun 30, 2023
a1749d7
Fixed a documentation error
Claudenw Jul 4, 2023
8eda0ba
code format cleanup
Claudenw Jul 6, 2023
7bd8d33
code simplification and documentation
Claudenw Jul 6, 2023
63bfe90
added isEmpty and associated tests
Claudenw Jul 6, 2023
8f22d46
Changes as requested by review
Claudenw Jul 6, 2023
1addfe7
cleaned up formatting errors
Claudenw Jul 6, 2023
ac92c7d
fixed javadoc issues
Claudenw Jul 6, 2023
6188866
added LayeredBloomFilter to overview.
Claudenw Jul 6, 2023
2967b1e
added coco driven test cases.
Claudenw Jul 6, 2023
6517fed
attempt to fix formatting
Claudenw Jul 7, 2023
c3fbcf5
cleaned up javadoc differences
Claudenw Jul 7, 2023
b8e4850
cleaned up javadoc
Claudenw Jul 7, 2023
7732ede
Made flatten() part of BloomFilterProducer
Claudenw Jul 7, 2023
9d8282c
fixed since tag.
Claudenw Jul 7, 2023
c18e7da
changed X() methods to setX()
Claudenw Jul 21, 2023
f24bfad
updated javadoc
Claudenw Jul 21, 2023
f0eb919
fixed javadoc errors
Claudenw Jul 21, 2023
e193143
Merge branch 'master' into layered_filter
Claudenw Aug 15, 2023
75b9a6d
merged changes from master
Claudenw Aug 15, 2023
e3ac952
renamed to Test to CellProducerFromLayeredBloomFilterTest
Claudenw Aug 15, 2023
508eec3
changed to jupiter from junit.
Claudenw Aug 25, 2023
c2ecf7e
added override for uniqueIndices as optimization.
Claudenw Aug 25, 2023
9769046
fixed checkstyle issue
Claudenw Aug 27, 2023
b39a472
modified as per review
Claudenw Oct 1, 2023
195f987
Merge branch 'layered_filter' of github.com:Claudenw/commons-collecti…
Claudenw Oct 1, 2023
a71b55e
Updated tests as per review
Claudenw Oct 27, 2023
4babacf
fixed variable initialization issues
Claudenw Oct 28, 2023
95df800
Merge branch 'master' into layered_filter
Claudenw Nov 24, 2023
68201e5
made suggested test changes
Claudenw Nov 27, 2023
d806d6e
fixed broken test
Claudenw Nov 27, 2023
500a252
Remove dead comments per code reviews
garydgregory Dec 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
import org.junit.jupiter.api.Test;

public class CountingPredicateTest {
private List<Pair<Integer, Integer>> expected = new ArrayList<>();
private List<Pair<Integer, Integer>> result = new ArrayList<>();
//private List<Pair<Integer, Integer>> expected = new ArrayList<>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Claudenw I don't think we need to keep these.

//private List<Pair<Integer, Integer>> result = new ArrayList<>();
private Integer[] ary = {Integer.valueOf(1), Integer.valueOf(2)};

private BiPredicate<Integer, Integer> makeFunc(BiPredicate<Integer, Integer> inner) {
private BiPredicate<Integer, Integer> makeFunc(BiPredicate<Integer, Integer> inner, List<Pair<Integer, Integer>> result) {
return (x, y) -> {
if (inner.test(x, y)) {
result.add(Pair.of(x, y));
Expand All @@ -48,12 +48,12 @@ private BiPredicate<Integer, Integer> makeFunc(BiPredicate<Integer, Integer> inn
*/
@Test
public void testPredicateShorter() {
List<Pair<Integer, Integer>> expected = new ArrayList<>();
List<Pair<Integer, Integer>> result = new ArrayList<>();
Integer[] shortAry = {Integer.valueOf(3)};
expected.clear();
expected.add(Pair.of(3, 1));
expected.add(Pair.of(null, 2));
result.clear();
CountingPredicate<Integer> cp = new CountingPredicate<>(shortAry, makeFunc((x, y) -> true));
CountingPredicate<Integer> cp = new CountingPredicate<>(shortAry, makeFunc((x, y) -> true, result));
for (Integer i : ary) {
assertTrue(cp.test(i));
}
Expand All @@ -68,11 +68,11 @@ public void testPredicateShorter() {
*/
@Test
public void testPredicateSameLength() {
expected.clear();
List<Pair<Integer, Integer>> expected = new ArrayList<>();
List<Pair<Integer, Integer>> result = new ArrayList<>();
expected.add( Pair.of(1, 3));
expected.add( Pair.of(2, 3));
result.clear();
CountingPredicate<Integer> cp = new CountingPredicate<>(ary, makeFunc((x, y) -> true));
CountingPredicate<Integer> cp = new CountingPredicate<>(ary, makeFunc((x, y) -> true, result));
assertTrue(cp.test(3));
assertTrue(cp.test(3));
assertEquals(expected, result);
Expand All @@ -86,10 +86,11 @@ public void testPredicateSameLength() {
*/
@Test
public void testPredicateLonger() {
expected.clear();
List<Pair<Integer, Integer>> expected = new ArrayList<>();
List<Pair<Integer, Integer>> result = new ArrayList<>();
expected.add(Pair.of(1, 3));
result.clear();
CountingPredicate<Integer> cp = new CountingPredicate<>(ary, makeFunc((x, y) -> x!=null));

CountingPredicate<Integer> cp = new CountingPredicate<>(ary, makeFunc((x, y) -> x!=null, result));
assertTrue(cp.test(Integer.valueOf(3)));
assertEquals(expected, result);
expected.add(Pair.of(2, null));
Expand All @@ -102,7 +103,7 @@ public void testPredicateLonger() {
expected.add(Pair.of(1, null));
expected.add(Pair.of(2, null));
result.clear();
cp = new CountingPredicate<>(ary, makeFunc((x, y) -> x!=null));
cp = new CountingPredicate<>(ary, makeFunc((x, y) -> x!=null, result));
assertTrue(cp.forEachRemaining());
assertEquals( expected, result);

Expand All @@ -111,7 +112,7 @@ public void testPredicateLonger() {
expected.clear();
expected.add(Pair.of(1, null));
result.clear();
cp = new CountingPredicate<>(ary, makeFunc((x, y) -> x == Integer.valueOf(1)));
cp = new CountingPredicate<>(ary, makeFunc((x, y) -> x == Integer.valueOf(1), result));
assertFalse(cp.forEachRemaining());
assertEquals(expected, result);
}
Expand Down