lance-format / lance-format/lance
Cleanup u64 vs usize usage
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7.1k
- Forks
- 852
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 272
Description
There's a lot of place where we use usize where we shouldn't.
There is an initial cleanup that is done in https://github.com/lancedb/lance/pull/4080 as a part of upgrading the object_store version. But this only does changes up to the Lance reader which has functions like:
/// Object/File Size.
async fn size(&self) -> object_store::Result<usize>;
/// Read a range of bytes from the object.
///
/// TODO: change to read_at()?
async fn get_range(&self, range: Range<usize>) -> object_store::Result<Bytes>;
Ideally we should propagate the usage of u64 to all callers to make sure we do not do redundant conversions. Create this issue to track this work.
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 PR 4080 and the Lance reader APIs shown in the issue, especially size() and get_range(). Trace their callers to identify remaining usize usage and conversions. Done means u64 is propagated through the relevant callers without redundant conversions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, data
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100