Commit 20cdb67
committed
refactor(mem_wal): align LsmScanner with the dataset Scanner interface
LsmScanner gains a Scanner-aligned (owned) builder so an LSM read reads like a
normal scan. `nearest()` and `full_text_search()` become state setters and
`create_plan()` dispatches to the vector, FTS, point-lookup, or plain planner,
mirroring `Scanner::create_plan` / `MemTableScanner::create_plan`.
- Add `nearest`, `nprobes`, `refine`, `distance_metric` (vector search folds the
LsmVectorSearchPlanner behind the builder; honors the builder filter).
- `full_text_search(FullTextSearchQuery)` is now a setter (column from the query,
k from `limit`) instead of returning a plan directly.
- Align `project` (`<T: AsRef<str>>` + `Result`) and `limit`
(`Option<i64>, Option<i64>` + `Result`) with `Scanner`.
Knobs the LSM planner cannot yet honor (ef, distance_range, maximum_nprobes,
with_row_id) are intentionally not exposed to avoid silently ignoring them.1 parent 52d508e commit 20cdb67
5 files changed
Lines changed: 817 additions & 58 deletions
File tree
- java/lance-jni/src
- python/src
- rust/lance/src/dataset/mem_wal
- scanner
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
364 | | - | |
| 364 | + | |
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
| |||
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
402 | 404 | | |
403 | 405 | | |
404 | 406 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
523 | | - | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
524 | 528 | | |
525 | 529 | | |
526 | 530 | | |
| |||
549 | 553 | | |
550 | 554 | | |
551 | 555 | | |
552 | | - | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
553 | 561 | | |
554 | 562 | | |
555 | 563 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
0 commit comments