Skip to content

connection: add open table options - #153

Merged
Xuanwo merged 6 commits into
mainfrom
xuanwo/open-table-options
Nov 22, 2026
Merged

Xuanwo merged 6 commits into
mainfrom
xuanwo/open-table-options

Conversation

@Xuanwo

@Xuanwo Xuanwo commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add lancedb_connection_open_table_with_options and a borrowed LanceDBOpenTableOptions with multi-component namespace path, optional location, per-table storage key/value pairs, index_cache_size, version, branch and managed_versioning.
  • Reuse the landed namespace_path_from_c conversion and forward the options through the pinned SDK OpenTableBuilder; the C layer does not emulate backend behavior.
  • Keep the legacy lancedb_connection_open_table signature, errors and output ownership unchanged. The new entry clears table_out and the error slot on entry and writes table_out only on success.
  • Document the observed embedded listing, embedded namespace and Enterprise behavior at lancedb v0.42.0-beta.21. The SDK attaches the connection Session to embedded opens, so an explicit index_cache_size, including zero, is forwarded but does not resize or disable the Session's effective cache.

Tests

  • C++ connection suite covers zero/NULL defaults, explicit index cache zero, unused initialized version/managed_versioning fields, version snapshots with rejected writes, version zero selection, main branch plus version, a named branch head and pinned branch version, missing branch, custom location, borrowed storage options and invalid arrays, an invalid scheduler_error_mode diagnosed by the SDK, managed-versioning unset/false/true, multi-component namespace selection, invalid options, and output clearing versus the legacy entry.
  • C17 enum ABI assertions; host and MSVC LLP64 check-abi self-tests (184 functions, 38 structs, 8 shared enums); strict C17 and C++20 header probes; cargo fmt --check; locked metadata.
  • Hosted native CI is the full compile and runtime verification.

The current C API still has no create-with-namespace entry, so a positive non-root table setup remains with the create slice. Named branch creation and pinned branch opens now use the landed branch lifecycle APIs.

Refs #125

Bind the SDK OpenTableBuilder options while keeping the legacy open entry unchanged. Reuse the landed namespace path conversion and document backend behavior at the pinned SDK.
The SDK attaches the connection Session to every embedded open, so an explicit index_cache_size does not resize the Session cache. Cover unused option fields and an invalid scheduler_error_mode diagnosis.
…ions

# Conflicts:
#	tests/test_c_enum_inputs.c
Open the branch head and a pinned branch version through the new options, and keep the existing main and missing-branch cases.
Read the fork and head versions from the branch instead of assuming the shared main version.
@Xuanwo
Xuanwo merged commit 3d10002 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