Skip to content

connection: add direct namespace builder - #167

Merged
Xuanwo merged 5 commits into
mainfrom
xuanwo/namespace-builder-implementation
Nov 22, 2026
Merged

Xuanwo merged 5 commits into
mainfrom
xuanwo/namespace-builder-implementation

Conversation

@Xuanwo

@Xuanwo Xuanwo commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Implements the direct namespace slice of #124.

Adds lancedb_connect_namespace and a consuming LanceDBConnectNamespaceBuilder over the pinned SDK's lancedb::connect_namespace. The constructor copies borrowed implementation properties. The opaque builder exposes storage options, namespace client properties, the millisecond read consistency interval, a borrowed session, and the SDK's QueryTable/CreateTable pushdown values. Execute returns the existing LanceDBConnection, so connection free, URI, read consistency and table APIs keep their current contracts.

dir works without extra features, rest follows the SDK remote feature gate, and unknown implementations or missing required properties surface the SDK's namespace connection error. Pushdown values are checked explicitly before mapping. With the pinned SDK, CreateTable is forwarded but the namespace create path still declares the table and writes locally.

The connection storage-options map is a create fallback only when the namespace response omits storage_options; an explicit empty map prevents that fallback and the selected map overrides per-write keys. Open uses describe_table storage options plus per-open options instead. The dir implementation's own root I/O uses storage.* implementation properties, not this map.

Validation on implementation head 2bbd9c4 (tree a6f7f74) with integrated main cf32a6a and SDK 0.42.0-beta.21: locked default tests 5/5, locked no-default tests 4/4, strict Clippy, host and MSVC LLP64 ABI checks (221 functions / 52 structs / 12 enums), and the targeted CMake connection plus C17 consumer CTest. The connection suite passed Valgrind with 0 errors and 0 definite/possible leaks. The docs-only follow-up head f6f60ad (tree d17b403) passed fmt, strict C17 and both ABI checks; its storage-option wording was checked against the SDK v0.42.0-beta.21 and beta.22 sources.

The integrated head 9d2dd14 (tree f36f1ece) appends actual main 16d6217, including SDK beta.22 and Lance beta.26, and keeps only the seven-file namespace delta with no SDK pin changes relative to main. Integrated-head fmt, strict C17, and host/MSVC LLP64 ABI checks pass; the ordinary hosted native and documentation suites are running.

Refs #124. The tracker remains open for the remaining connection slices.

Add lancedb_connect_namespace and a consuming builder for the SDK's
ConnectNamespaceBuilder. Bind borrowed implementation properties, storage
options, namespace client properties, read consistency, session borrowing,
and the SDK's two pushdown operations, then execute to the existing
connection handle.

Cover a real dir namespace through the C and C++ public APIs, SDK
validation errors, invalid inputs and ownership. Feature-gated tests cover
rest and no-remote builds.

Refs #124
Document where namespace connection storage options are used during
create and open, including the namespace response fallback and per-write
override. Distinguish them from the dir implementation's storage.*
properties for its own root object store.

State that namespace execute publishes the connection output only on
success and preserves an existing error message slot, matching the URI
connect builder.

Refs #124
@Xuanwo
Xuanwo merged commit 6726d51 into main Nov 22, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant