-
Notifications
You must be signed in to change notification settings - Fork 108
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
Adding partition logic #161
Conversation
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.
@Whattabatt left a few comments on supporting partitioning on all types of filtering (by document, by ngram). I think we could maybe move the check into the bloom filter itself?
num_processed += 1; | ||
//Compute the remaining hashes | ||
hashes.extend(bloom_filter.remaining_hashes(&dedupe_key)); | ||
if bloom_filter.contains(&hashes) { |
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.
uhm I don't fully follow the logic here. What I would do is have this contains
function check if whatever you are putting into the bloom filter matches partition, and if so, put that into the filter.
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.
This is optimizing for reducing the number of hash function calls - partitioning only on the first hash of N and not doing any other hashing etc if it doesn't. Does that seem worthwhile? Regardless I'll add a comment since the behavior isn't super clear
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.
New changes looks good–perhaps worth adding some unit tests?
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.
lgtm
No description provided.