[BUG][Java] Review and fix data types for neighbours and prefilters
Nobody has claimed this yet.
- Dominant language
- Cuda
- Stars
- 854
- Forks
- 236
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 62
Description
Currently, neighbours and prefilters are defined with different data types across different indices types (Cagra/Hnsw/Bruteforce), and inconsistent with the Java type. E.g. they are mostly defined as Java long[], but sometimes they are defined as int[], and/or use a OfInt MemorySegment, and/or use a DLManagedTensor with code DLUint/DLInt, with 32 or 64 bits.
Using the wrong data size (32 bits with longs or 64 bits with ints) can lead to wrong results or memory corruption and crashes.
In https://github.com/rapidsai/cuvs/pull/1232 I have marked several inconsistencies with TODOs; those needs to be fixed, but also a thorough review should be done to identify all.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the TODOs identified in PR #1232, then compare neighbour and prefilter types across the Cagra, Hnsw, and Bruteforce index implementations. Done means all Java, MemorySegment, and DLManagedTensor representations use consistent sizes and the review finds no remaining inconsistencies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100