feature: record field lineage when a cast mints a new field ID
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 15/100
Research direction
This is design work, not a first-timer task. Start by reading #8658 for how non-reusable field IDs work, then the alter_columns cast path and the Transaction V2 DropField + AddField handling named in the issue. Settle the open questions first: a reserved schema metadata key versus a pb::Field proto field, and whether non-cast replacements also record derived_from. Done means a maintainer-agreed design, then an implementation with tests that the pointer is persisted and ignored for reads of old-ID data.
Written by the indexing model from the issue text.
Description
Since #8658, a cast assigns the column a new field ID once non-reusable field IDs are active. That keeps stale data keyed by the old ID (index segments, MemWAL rows, overlays, unrewritten files) from being read as the new type, but it loses the link between the old and new field. Tools that track a column across versions (CDC consumers, catalogs, schema history) cannot tell that field 5 is field 0 after a cast.
Proposal: when a field replaces another, record the replaced ID on the new field, e.g. derived_from: 0. Casts form a chain that can be followed back through older versions.
- Informational only. Readers must not use it to treat data, index segments, or WAL rows written for the old ID as valid for the new one.
- Persist it in the schema, not only in the transaction, since transaction files are cleaned up. A reserved field metadata key survives legacy writers that rewrite the schema; an unknown
pb::Fieldproto field would be dropped. - Record it only on datasets with non-reusable field IDs active. On legacy datasets the old ID may be reused, so the pointer would be ambiguous.
- Set it from both
alter_columnscasts and Transaction V2 casts (DropField+AddField+ data). V2 conflict detection can then use it as the explicit signal that anAddFieldreplaces a dropped field.
Open questions:
- Metadata key vs.
pb::Fieldfield. - Whether other replacements besides casts (e.g. a rewrite of a column under a new definition) should record it.
- Dominant language
- Rust
- Stars
- 7.2k
- Forks
- 900
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 366
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from lance-format/lance
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 78/100
lance-format/lance#10225 ·
Maintainers usually reply within 3 days
-
feature performance
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
lance-format/lance#10137 ·
Maintainers usually reply within 3 days
-
After initialize_mem_wal, every FTS query logs "ERROR Index __lance_mem_wal has no fields"Possibly taken @lance-gatefixer claimed this 23 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
lance-format/lance#9655 ·
Maintainers usually reply within 3 days
-
Upgrade DataFusion for the unparser stack-overflow fixMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
lance-format/lance#8225 ·
Maintainers usually reply within 3 days
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 84/100
lance-format/lance#6425 · 2 comments ·
Maintainers usually reply within 3 days
All issues in lance-format/lance
Similar issues
-
Small glitchOpenpriority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
storytold/photocraft#9538 ·
Maintainers usually reply within 1 day
-
bug P2 rust
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
jscott3201/rusty-bacnet#2085 ·
Maintainers usually reply within 1 day
-
area:tag area:tag---json---markdown--n bug factory:dogfood factory:triaged persona:scripter platform:linux-cloud priority:p3 type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
gitbutlerapp/grit#1940 · 1 comment ·
Maintainers usually reply within 1 day
-
Inconsistent case in names for Windows installation packages compared to all other assetsPossibly taken A pull request linked to this issue is open or already merged. Openarea:ui bug in progress needs-triage
Difficulty 1/5 Under an hour Newbie friendliness 65/100
bherbruck/solvecraft#6769 · 2 comments ·