lance-format / lance-format/lance
Simplify Schema implementation in Rust
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7.1k
- Forks
- 852
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 272
Description
We have a custom schema implementation, but we so often convert it to/from Arrow schemas, it might make sense to implement it as:
pub struct Schema {
schema: Arc<arrow_schema::Schema>,
/// Field ids, in depth-first order
field_ids: Vec<i32>,
}
This would be quick to convert to Arrow when we need to.
Getting by field id wouldn't be slower, as we already do a linear search of fields anyways. We could make it fast by doing field_ids: HashMap<i32, Arc<arrow_schema::Field> if we wanted to.
Getting the id of a given field would be harder, though.
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 locating the current custom Schema implementation and every path that converts it to or from Arrow schemas. Review how field-id lookup and retrieving an id for a field currently work. Done means the representation can use an Arrow schema without slowing or breaking those behaviors, with tests covering the conversion and lookups.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- data-engineering
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100