index.delete requires unique ids and errors not thrown
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 683
- Forks
- 129
- Avg merge
- 15m
- Merged PRs (30d)
- 2
Description
per http://toblerity.org/rtree/class.html#rtree.index.Index.delete it states for the id parameter to delete: long integer A long integer that is the identifier for this index entry. IDs need not be unique to be inserted into the index, and it is up to the user to ensure they are unique if this is a requirement.
However I tried this with with an Index which had a set of points which all had the same ids and it never removed it items. As soon as I gave each point a unique id the points got removed.
There are two bugs here:
- documentation should be updated or implementation fixed
- the python code should be checking error code returned by
Index_DeleteDataand throwing exception if the delete failed. Probably should go over the whole index.py file to make sure returned error codes are enforced.
Contributor guide
No contributing guide indexed for this repository
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
Read the Index.delete documentation at the linked API page and inspect index.py, starting with Index_DeleteData and its handling of returned error codes. Reproduce deletion with duplicate and unique IDs, then align the documentation or implementation and ensure failed deletions are reported consistently across the mentioned file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100