-
Notifications
You must be signed in to change notification settings - Fork 78
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
fix rust Signature
API for minhashes method.
#1167
Labels
Comments
5 tasks
worked on exposing this error more cleanly -- in
then:
yields
and
causes a segmentation fault. |
For whoever ends up implementing this: rename the |
6 tasks
ctb
added a commit
that referenced
this issue
Oct 15, 2022
Addresses #1167 by fixing `signature_first_mh` in the signature FFI to support both `KmerMinHash` and `KmerMinHashBTree`; this way, sketches generated by the Python `_signatures_for_sketch_factory` (which are BTree sketches in Rust) can be passed back to Python. Specifically, this PR: * implements `From<&KmerMinHashBTree>` for `KmerMinHash`; * adds an arm to the match statement in the FFI function to catch `KmerMinHashBTree` structs and convert them into `KmerMinHash` structs suitable for returning to Python; * provides a default match arm to catch (e.g.) `HyperLogLog` and raise an error back to Python reporting that it found an unsupported sketch type; * adds a little to the Python tests to prevent backsliding. Note that I don't _think_ this does any more copying of sketches than the current codebase does. And, on that halcyonic day when the FFI properly wraps `KmerMinHashBTree`, this code can be replaced by returning the proper Rust object without conversion. Fixes #1167.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
see #1159 (comment) and follow-on.
The text was updated successfully, but these errors were encountered: