Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
403e4b6
feat: add lance namespace read write support
Jun 19, 2026
aa34c09
feat(namespace): extend Lance Namespace support and harden implementa…
Jul 3, 2026
7b1a7c4
fix(namespace): tighten missing table handling
Jul 7, 2026
b2e28c5
refactor(sink): resolve namespace tables at execution time via DataSi…
Jul 16, 2026
37b0256
fix(namespace): thread io_config credentials into namespace-resolved …
Jul 16, 2026
64501fb
chore: zero out mypy errors in daft_lance sources and namespace tests
Jul 16, 2026
0feda98
docs(namespace): document namespace params everywhere and validate or…
Jul 16, 2026
2e71956
fix(namespace): address independent review findings
Jul 16, 2026
6fb5437
test(namespace): lock in sink pickle round-trip and compaction fragme…
Jul 16, 2026
7833d58
fix(namespace): request vended credentials explicitly and unify empty…
Jul 16, 2026
72cb1c7
docs(namespace): point rest:// uri error at the namespace parameters
Jul 16, 2026
8627210
docs(namespace): explain the integration layer's design for reviewers
Jul 16, 2026
3bf5943
refactor(namespace): drop patch_daft in favor of daft_lance entry points
Jul 16, 2026
fc7cda3
style: format scalar index namespace reload
Jul 16, 2026
6f3bd94
chore: drop unused __future__ import from package init
Jul 16, 2026
ea3293d
refactor(namespace): remove legacy and unrelated compatibility paths
Jul 20, 2026
fe11b9a
refactor(namespace): make Lance open context explicit
Jul 21, 2026
f7f665c
fix(namespace): propagate managed versioning through commits
Jul 21, 2026
2b97eb1
refactor(namespace): tighten integration types
Jul 21, 2026
9db4115
fix(namespace): percent-decode file:// locations
Jul 21, 2026
4596b22
refactor(utils): drop construct_lance_dataset compat wrapper
Jul 21, 2026
8af22c7
feat(sink): reject namespace writes combined with use_mem_wal
Jul 21, 2026
0cbe59a
test(namespace): cover uri decoding, handle API and mem-WAL rejection
Jul 21, 2026
d1424f3
refactor(namespace): reopen datasets on workers via DatasetOpenContext
Jul 22, 2026
918a43a
fix(namespace): pin scan workers to the planned version, recover lost…
Jul 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,63 @@ from daft_lance import merge_columns_df
merge_columns_df(df, "s3://bucket/my_dataset")
```

### Namespace Tables

Address Lance tables through a [Lance Namespace](https://lancedb.github.io/lance-namespace/)
(catalog) instead of a raw URI. Pass `namespace_impl` + `namespace_properties` + `table_id`
in place of `uri` — the namespace resolves the table's storage location and vends any storage
credentials. This works across `read_lance`, `write_lance`, `merge_columns_df`,
`create_scalar_index`, and `compact_files`.

```python
import daft
import daft_lance

table_id = ["my_table"]
namespace = {"namespace_impl": "dir", "namespace_properties": {"root": "/tmp/lance_tables"}}

daft_lance.write_lance(
daft.from_pydict({"id": [1, 2, 3]}),
table_id=table_id,
mode="create",
**namespace,
).collect()

df = daft_lance.read_lance(table_id=table_id, **namespace)
```

`uri` and the namespace parameters are mutually exclusive: provide exactly one of `uri` or
(`namespace_impl` + `table_id`).

#### Using a REST namespace (e.g. Gravitino Lance REST server)

```python
namespace = {
"namespace_impl": "rest",
"namespace_properties": {"uri": "http://127.0.0.1:9101/lance"},
}
table_id = ["lance_catalog", "sales", "orders"]

daft_lance.write_lance(df, table_id=table_id, mode="create", **namespace).collect()
daft_lance.read_lance(table_id=table_id, **namespace).show()
```

When the catalog holds the storage configuration (bucket, endpoint, credentials), the
`describe_table` response vends `storage_options` to the client, so you do not need to pass
object-store credentials yourself. If the namespace does not vend credentials, your
`io_config` (or explicit `storage_options`) is applied to the resolved location; when both
are present, namespace-vended options take precedence.

Namespace clients are cached per (implementation, properties) pair. The cache size defaults
to 16 and can be tuned with the `DAFT_LANCE_NAMESPACE_CACHE_SIZE` environment variable
(read once at import time).

#### Daft's own entry points

Native namespace support in `daft.read_lance` / `DataFrame.write_lance` is tracked in
[Eventual-Inc/Daft#7282](https://github.com/Eventual-Inc/Daft/issues/7282); until that lands,
use the `daft_lance` entry points shown above for namespace-addressed tables.

## Migration

The migration only requires replacing `daft.io.lance` with `daft_lance`.
Expand Down
2 changes: 2 additions & 0 deletions daft_lance/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
merge_columns,
merge_columns_df,
read_lance,
write_lance,
)

__all__ = [
Expand All @@ -19,4 +20,5 @@
"merge_columns_df",
"read_lance",
"take_blobs",
"write_lance",
]
Loading
Loading