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:
Yang Cen
2026-12-02 09:28:50 +00:00
committed by GitHub
parent 2e46464589
commit 50c66c66d5
10 changed files with 203 additions and 10 deletions
+5 -1
View File
@@ -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,
})
}