mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-26 12:33:59 +00:00
fix: add dataset path hint and sync open_table location (#5128)
## Summary - Expose `location=` on sync `LanceDBConnection.open_table()`, matching the existing async entry point while leaving remote and namespace APIs unchanged. - When a `ListingDatabase` connection URI ends in `.lance`, append a parent-directory and table-stem hint to the derived-URI `TableNotFound` error. The error classification and source chain are preserved, and no extra storage probes are made. Context: OSS-2858 remains canceled. This is only the narrow embedded DX follow-up; it does not add a top-level `lancedb.open_table(uri)` API. ## Verification - Rust targeted listing tests for the `.lance` hint and the explicit-location path. - Python sync `open_table` tests for `location=` and the `.lance` hint. - Pickle round-trip of a sync `location=` table after #5114. - `cargo check --features remote --tests --examples`, `cargo fmt --check`, Ruff format/check.
This commit is contained in:
@@ -37,6 +37,14 @@ embedding_functions`. Prefer keyword arguments for optional parameters.
|
||||
|
||||
::: lancedb.db.DBConnection
|
||||
|
||||
Embedded connections support `location=` on `open_table` to open a table from an
|
||||
explicit dataset URI instead of the derived `<database>/<name>.lance` path:
|
||||
|
||||
```python
|
||||
db = lancedb.connect("./data")
|
||||
table = db.open_table("events", location="./datasets/events.lance")
|
||||
```
|
||||
|
||||
Use `db.server_info()` (or `await db.server_info()` on an asynchronous connection)
|
||||
to include the responding server's release, Git revision, build date and Function
|
||||
runtime information in a bug report. It returns a JSON-compatible dictionary and
|
||||
|
||||
Reference in New Issue
Block a user