Commit bc4cb04
refactor(index): introduce lance-index-core crate with abstract index trait layer
Extracts the abstract trait layer for scalar indices into a new
`lance-index-core` crate (~17 deps vs 75+ in lance-index), enabling
index plugin authors to implement ScalarIndex without depending on
the full lance-index implementation crate.
Moved to lance-index-core: Index, IndexType, IndexParams, MetricsCollector,
ScalarIndex, AnyQuery, IndexStore/Reader/Writer, RowIdRemapper, SearchResult,
CreatedIndex, UpdateCriteria, OldIndexDataFilter, ScalarIndexParams,
BuiltinIndexType, TrainingCriteria/TrainingOrdering, IndexFile.
lance-index and lance-table re-export all moved types for backward
compatibility. FragReuseIndex/MemWalIndex trait impls move to lance-table
where those types are defined.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
refactor(index): break lance-table → lance-index-core dependency
Remove the unintended `lance-table → lance-index-core` dependency introduced
in the previous commit. Key changes:
- Restore `IndexFile` as a standalone struct in `lance-table` (duplicate of
the one in `lance-index-core`), removing the re-export that forced the dep
- Add `index_files_to_table()` / `table_files_to_index()` free functions in
`lance-index` to convert between the two distinct `IndexFile` types
- Introduce newtype wrappers `FragReuseIndexHandle` and `MemWalIndexHandle` in
`lance-index` so that `Index` / `RowIdRemapper` (now in `lance-index-core`)
can be implemented on the `lance-table` types without violating orphan rules
- Remove the `lance-index-core` trait impls that were added directly on
`FragReuseIndex` / `MemWalIndex` in `lance-table`
- Update all call sites in `lance`, `lance-index`, and `lance-namespace-impls`
to use the handle newtypes and conversion functions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent fff336c commit bc4cb04
40 files changed
Lines changed: 1364 additions & 1128 deletions
File tree
- java/lance-jni
- python
- src
- rust
- lance-index-core
- src
- lance-index
- src
- scalar
- rtree/sort
- vector
- flat
- hnsw
- lance-namespace-impls/src/dir
- lance/src
- dataset
- index
- scalar
- vector/ivf
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
83 | 88 | | |
84 | 89 | | |
85 | 90 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| 71 | + | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
| 258 | + | |
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
0 commit comments