feat: let scalar index plugins declare their row-address domain

Aperta
#10,886 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
databases

Direzione di ricerca

Start with rust/lance-table/src/format/index.rs and trace how IndexMetadata classifies built-in index details, then read the scalar plugin registration path and rust/lance/tests/external_scalar_plugin.rs. Check how the crate boundaries allow lance-table to access plugin declarations. Done means tests show declared row-address and remap capabilities work with stable row IDs and after compaction, while undeclared plugins keep current behavior.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

feature

Summary

A scalar index plugin registered with register_scalar_index_plugin (#10111) has no way to declare two facts that Lance needs about it:

  • whether its postings are row addresses or stable row IDs;
  • whether it can be remapped in place after compaction.

IndexMetadata decides both from hard-coded lists of built-in details types in rust/lance-table/src/format/index.rs:

  • index_details_are_row_addrs / results_are_row_addrs
  • supports_eager_remap
  • can_follow_stable_row_ids

So an out-of-tree plugin is always treated as storing row IDs. On a dataset with stable row IDs, a plugin that stores row addresses has its results misread. After compaction it also loses coverage of the rewritten fragments until it is rebuilt, even when it implements remap.

Proposal

  • ScalarIndexPlugin (or the registration call) declares:
    • the index version from which its postings are row addresses, if any;
    • whether it can remap in place.
  • register_scalar_index_plugin records the declaration in a small registry in lance-table, keyed by the details type URL. It has to live there because lance-table can't depend on lance-index.
  • The functions above consult that registry after their built-in lists.
  • Plugins that declare nothing keep today's behaviour.

Tests

Extend rust/lance/tests/external_scalar_plugin.rs:

  • A plugin that declares row addresses returns the right rows on a dataset with stable row IDs.
  • After compaction, a plugin that declares it can remap keeps coverage of the rewritten fragments.

Happy to open a PR.

Lingua principale
Rust
Stelle
7.3k
Fork
929
Merge medio
2g 22h
PR unite (30g)
572

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di lance-format/lance

Tutte le issue di lance-format/lance

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.