refactor: move core index utilities into a trait that does not depend on lance#7340
refactor: move core index utilities into a trait that does not depend on lance#7340westonpace wants to merge 2 commits into
Conversation
Introduce `lance-index-core` as a lightweight crate containing only abstract interfaces (traits, enums, expression types) with minimal dependencies. `lance-index` remains the concrete implementation crate and re-exports everything from core for backwards compatibility. Key changes: - New `lance-index-core` crate: Index/IndexMetadata/IndexParams traits, scalar expression parsing, plugin registry interfaces, metrics and progress traits, and a new `RowIdRemapper` trait - `RowIdRemapper` trait replaces direct `Arc<FragReuseIndex>` usage in the plugin API, removing the `lance-table` dependency from core - `FragReuseIndex` implements `RowIdRemapper` in `lance-index` - `IndexFile` defined locally in core (identical fields, no table dep) - All call sites in `lance/src/` cast `Arc<FragReuseIndex>` to `Arc<dyn RowIdRemapper>` at the crate boundary Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Resolve conflicts from the rebase onto origin/main and fix bugs
introduced when porting the refactoring:
- Fix fmindex plugin lookup: remove the "fmindex"→"fm" rename in
get_plugin_name_from_details_name so the plugin registers under the
same name ("fmindex") that BuiltinIndexType::FMIndex produces.
- Add extract_nested_column_path to lance-index-core expression.rs
so scalar index queries on nested fields with dots in field names
(e.g. data.`value.v1`) are correctly resolved via get_field chains.
- Port the IsNotNull(regexp_match(...)) unwrapping from lance-index
into lance-index-core so NGram regex acceleration still fires.
- Move Index/RowIdRemapper impls for FragReuseIndex and MemWalIndex
to lance-table to avoid orphan rule violations.
- Fix CreatedIndex.files to use Option<Vec<IndexFile>>, fix IndexType
references (Fm→FMIndex), remove duplicate code from expression.rs,
remove unused imports and dead BTreeIndex::lookup_batch field.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Current status (notes for my own book-keeping) Non-trivial changes in this refactorThis PR extracts abstract traits and types from 1.
|
No description provided.