-
Notifications
You must be signed in to change notification settings - Fork 8
Bloom filter bindings #62
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
Open
c-dickens
wants to merge
9
commits into
apache:bloom-filter-bindings
Choose a base branch
from
c-dickens:bloom-filter-bindings
base: bloom-filter-bindings
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Bloom filter bindings #62
c-dickens
wants to merge
9
commits into
apache:bloom-filter-bindings
from
c-dickens:bloom-filter-bindings
Conversation
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
…+ wrapper and add serialize test
…andalone function - Replace create_bloom_filter() function with bloom_filter.create_by_accuracy() and bloom_filter.create_by_size() static methods - Follow repository vernacular pattern similar to other sketches - Update tests to use new API - Fix indentation issues in test file - All tests passing (4/4 bloom filter tests, 37/37 other tests)
- Add reset() method to Python bloom filter wrapper - Method clears all bits and resets filter to empty state - Preserves filter configuration (capacity, num_hashes, seed) - Add comprehensive unit test for reset functionality - Test verifies empty state, bit usage reset, and post-reset operations
- Add efficient overloads for different Python data types: * uint64_t for non-negative integers * int64_t for negative/positive integers * double for floats * std::string for strings * bytes objects for binary data - Use proper static_cast syntax for nanobind compatibility - Add comprehensive unit test for all supported data types - Remove memoryview support (not available in nanobind) - All 16 bloom filter tests pass
- Fix bloom filter inversion test to use correct mathematical properties - Replace probabilistic expectation for new items after inversion with double-inversion test - Test that invert(invert(filter)) == filter, which is mathematically guaranteed - Update invert() method documentation to match C++ implementation - Add __repr__ method for better debugging and REPL experience
Contributor
Author
|
I'm surprised by these unit test errors. I will check locally and see if I've missed something obvious. |
Contributor
Author
|
Had an erroneous and outdated |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Added bindings for Bloom filter functions