Skip to content

connection: expose remote/cloud connect options, read consistency, and namespace paths #124

Closed

Description

@Xuanwo

Context & SDK Reference

lancedb-c (src/connection.rs) currently binds only uri, storage_option, and session on lancedb::ConnectBuilder, and only supports a single-string namespace parameter on a subset of operations (create_namespace, drop_namespace, list_namespaces, drop_table, rename_table).

Reference APIs in the pinned lancedb SDK (v0.42.0-beta.21, lancedb::connection):

  • ConnectBuilder: api_key, region, host_override, sql_host_override, read_consistency_interval, client_config (ClientConfig: user_agent, retry_config, timeout_config, extra_headers, tls_config, etc.), namespace_client_property / namespace_client_properties, manifest_enabled, aws_creds.
  • connect_namespace(ns_impl, properties) -> ConnectNamespaceBuilder (storage_option, read_consistency_interval, session, namespace_client_property, pushdown_operation).
  • Connection: describe_namespace, list_tables, drop_all_tables, read_consistency, and multi-level namespace_path: &[String] across table_names, create_table, open_table, drop_table, rename_table, list_namespaces, create_namespace, drop_namespace, describe_namespace.

Proposed C API Scope

  • Extend LanceDBConnectBuilder with setters for:
    • api_key, region, host_override
    • read_consistency_interval (e.g., seconds/milliseconds duration; distinguish unset / immediate 0 / interval)
    • client_config (flat C struct or builder setters covering timeouts, retries, user agent, extra headers, TLS options exposed by lancedb::remote::ClientConfig)
    • namespace_client_property / manifest_enabled
  • Expose lancedb_connect_namespace(...) and its builder (storage_option, read_consistency_interval, session, execute, free) for connecting directly to a LanceNamespace implementation (dir, rest, etc.).
  • Standardize multi-level namespace paths across Connection APIs (const char* const* namespace_path, size_t namespace_path_len, with NULL / 0 representing the root namespace), covering:
    • list_namespaces, create_namespace, drop_namespace, describe_namespace
    • table_names (TableNamesBuilder::namespace), drop_table, rename_table, drop_all_tables
    • create_table and open_table namespace path wiring (coordinated with the table builder options issue).

Non-Goals

  • Enterprise control-plane APIs (create_secret, create_storage_integration, create_view, create_property_graph, execute_query_async, OAuth interactive flows).
  • Embedding registry binding (ConnectBuilder::embedding_registry).

Acceptance Criteria

  • Rust FFI implementation and include/lancedb.h declarations stay in exact parity, with clear ownership and lancedb_free_* functions for all returned handles/strings.
  • Zero-initialized / NULL optional fields preserve lancedb SDK defaults.
  • C++ Catch2 tests exercise read_consistency_interval, multi-level namespace CRUD (create/list/describe/drop), connect_namespace (e.g., dir namespace), and remote builder configuration error/validation paths, passing CI and valgrind.

Activity

  1. added
    enhancement
    abi-change
    on Nov 22, 2026
  2. Xuanwo commented on Nov 23, 2026

    @Xuanwo
    MemberAuthor

    The C API now exposes remote connection settings and client configuration (#152, #169), direct namespace connections (#167), and multi-level namespace paths for namespace and table operations (#137, #153, #151). The tests cover read consistency, nested namespace management, direct dir connections, and remote configuration validation. The landed main commit 32591cf passed native CI, including the Linux Valgrind suites.

    Main CI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    abi-changeenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions