refactor(query): drop what the fusion fallback does not need

Four things the optimistic rework left behind:

`BackgroundCache` was the wrong type for remembering a refusal. Only
`try_get`/`seed`/`invalidate` were ever called, so its background-refresh
machinery was unreachable and the refresh window served only to shorten the
TTL it was paired with -- 30s of intent, 25s of behaviour. A
`Mutex<Option<Instant>>` says what this is.

Invalidating the memory after *installing* a write spec cleared a bit that is
necessarily unset already; the refusal that follows is what sets it. The
`unset` side is real and stays.

`LanceTable` overrode the learned-bit accessors with the same body as the
remote table, but a local table is never refused, so the base class default
already answers for it.

`drop_columns` was ten lines for one call site that `RecordBatch::drop_column`
covers in five, with the same tolerance for a reranker that reshaped its
output.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Daniel Rammer
2026-09-23 13:15:27 -05:00
co-authored by Claude Opus 5
parent a2d4597689
commit 90b99af20f
3 changed files with 26 additions and 52 deletions
-7
View File
@@ -4565,13 +4565,6 @@ class LanceTable(Table):
[`AsyncTable.get_lsm_write_spec`][lancedb.AsyncTable.get_lsm_write_spec]."""
return LOOP.run(self._table.get_lsm_write_spec())
def _hybrid_pk_fusion_learned(self) -> bool:
# `self._table` is the async table, which owns the Rust handle.
return self._table._hybrid_pk_fusion_learned()
def _note_hybrid_pk_fusion(self) -> None:
self._table._note_hybrid_pk_fusion()
def checkpoint_lsm(self) -> None:
"""Synchronous version of
[`AsyncTable.checkpoint_lsm`][lancedb.AsyncTable.checkpoint_lsm]."""