mirror of
https://github.com/lancedb/lancedb.git
synced 2026-12-03 07:45:17 +00:00
fix(python): return row addresses from embedded scans (#5344)
## Problem Embedded Python queries accept `with_row_address()`, but ordinary sync and async scans omit `_rowaddr`. ## Fix Pass the existing option to the Lance scanner for Embedded base-table scans. Embedded namespace queries that request addresses use the Embedded scanner. An RTE scan reports that addresses require `use_rte(False)` to read the base table. ## Validation The two-fragment tests verify sync batches and async Arrow results, `uint64` physical addresses, projection, and default and explicit disabling. Stable row IDs confirm that `_rowaddr` is distinct from `_rowid`. Additional tests cover namespace routing, RTE and vector/FTS builder conversion. All applicable checks passed for `64dd3c0e`. The baseline test run stopped at the `stats()` fixture and did not reach the query assertions. Tracks OSS-2972.
This commit is contained in:
+5
-1
@@ -654,6 +654,10 @@ impl Query {
|
||||
self.inner = self.inner.clone().with_row_id();
|
||||
}
|
||||
|
||||
pub fn _with_row_address(&mut self, enabled: bool) {
|
||||
self.inner = self.inner.clone().with_row_address(enabled);
|
||||
}
|
||||
|
||||
pub fn postfilter(&mut self) {
|
||||
self.inner = self.inner.clone().postfilter();
|
||||
}
|
||||
@@ -735,7 +739,7 @@ impl Query {
|
||||
}
|
||||
|
||||
Ok(FTSQuery {
|
||||
inner: self.inner.clone(),
|
||||
inner: self.inner.clone().with_row_address(false),
|
||||
fts_query: query,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user