lance-format / lance-format/lance

[MemTable] Make unenforced primary key columns ordered

Open
#4,239 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
7.1k
Forks
852
Avg merge
3d 18h
Merged PRs (30d)
272

Description

#4002 introduced the unenforced primary key concept, but the key is unordered because we just record a primary key boolean at the field level. @majin1102 brought up this in https://github.com/lancedb/lance/pull/4207#discussion_r2208168187.

I thought about this a bit, it's probably better to make it ordered for future potential use cases. For example, we could build a multi-column b-tree index for primary key columns instead one one for each column, and in that case the order of the column would affect the effectiveness of the b-tree.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the MemTable implementation and the unenforced primary-key metadata introduced by #4002; review the ordering concern in PR #4207. Done means primary-key columns retain a defined order rather than only a field-level boolean, with behavior suitable for future multi-column index use.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.