-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-19527][Core] Approximate Size of Intersection of Bloom Filters #16864
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
Closed
Bcpoole
wants to merge
13
commits into
apache:master
from
Bcpoole:approxItemsInBloomFilterIntersection
Closed
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
7a3ad46
Swamidass & Baldi approx. items in intersection of two Bloom filters.…
Bcpoole b9680c5
Changed createUnionBloomFilter & approxItemsInIntersection to be inst…
Bcpoole 501ad7e
Updated abstract class to reflect changes in previous commit
Bcpoole c2a775d
renamed ‘createUnionBloomFilter’ to ‘createUnion’ as per @rxin sugges…
Bcpoole 40a3954
renamed to to createUnion to union
Bcpoole ea554a6
Added some more javadoc
Bcpoole 9cd7165
Readded ‘-‘ to start of approxItems() formula that somehow got removed
Bcpoole 0ac7bf1
Handling of expected size being converted by BitArray concur
Bcpoole 0a3910e
Added more description (formula + explanation) of approxItems and app…
Bcpoole 8ec6092
Changed @seealso to @see. Added a note about approximation divergence
Bcpoole 5e085c0
Wrote test for approxItems() being infinity when full
Bcpoole d1921f8
Added a non-full Bloom filter to testApproxItems
Bcpoole 2cbf490
Added explanation as to why can’t run approxItems() directly on the i…
Bcpoole File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Updated abstract class to reflect changes in previous commit
- Loading branch information
commit 501ad7e22101b00862c0c77ef8c38e1b166d33a4
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -152,6 +152,20 @@ int getVersionNumber() { | |
| */ | ||
| public abstract boolean mightContainBinary(byte[] item); | ||
|
|
||
| /** | ||
| * Returns a new Bloom filter of the union of two Bloom filters. | ||
| * Unlike mergeInplace, this will not cause a mutation. | ||
| * Callers must ensure the bloom filters are appropriately sized to avoid saturating them. | ||
| * | ||
| * @throws IncompatibleUnionException if either are null, different classes, or different size or number of hash functions | ||
| */ | ||
| public abstract BloomFilterImpl createUnionBloomFilter(BloomFilter other) throws IncompatibleUnionException; | ||
|
|
||
| /** | ||
| * Swamidass & Baldi (2007) approximation for number of items in the intersection of two Bloom filters | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| */ | ||
| public abstract double approxItemsInIntersection(BloomFilter that) throws IncompatibleUnionException; | ||
|
|
||
| /** | ||
| * Writes out this {@link BloomFilter} to an output stream in binary format. It is the caller's | ||
| * responsibility to close the stream. | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about just calling this union?