Skip to content

feat(ffi): expose Database::open_databricks() behind databricks feature#333

Merged
genezhang merged 1 commit into
mainfrom
feat/ffi-databricks
May 16, 2026
Merged

feat(ffi): expose Database::open_databricks() behind databricks feature#333
genezhang merged 1 commit into
mainfrom
feat/ffi-databricks

Conversation

@genezhang
Copy link
Copy Markdown
Owner

Summary

DeltaGraph Phase 4.4 (FFI piece) — exposes Databricks connectivity through the UniFFI bridge so Go and Python consumers can use it with the same Database/Connection shape they already know.

  • New databricks cargo feature on clickgraph-ffi that forwards through clickgraph-embedded to the upstream executor.
  • New DatabricksConfig uniffi::Record + Database::open_databricks(schema, config) constructor (in a cfg-gated impl block, so default builds are unchanged).
  • AGENTS.md documents the feature gate and the binding regeneration recipe.

Python _ffi.py and Go bindings are not regenerated in this PR — those go in distribution-build artifacts (built with --features databricks). When distributions are cut, the existing recipe in AGENTS.md applies.

Test plan

  • cargo build -p clickgraph-ffi — default build unchanged
  • cargo build -p clickgraph-ffi --features databricks — adds Databricks symbol
  • cargo clippy -p clickgraph-ffi --features databricks --all-targets — clean
  • Underlying Database::new_databricks already covered by 3 wiremock-based e2e tests in clickgraph-embedded (PR feat(embedded): Database::new_databricks() + dialect plumbing (Phase 2.2b) #331)

🤖 Generated with Claude Code

DeltaGraph Phase 4.4 — adds the FFI surface so Go and Python (and any
future UniFFI consumer) can connect to a Databricks SQL Warehouse via
the same Database/Connection shape used for ClickHouse remote.

- New `databricks` cargo feature on `clickgraph-ffi`, forwards to
  `clickgraph-embedded/databricks` (which forwards to the upstream
  `clickgraph/databricks` reqwest-gated executor).
- New `DatabricksConfig` uniffi::Record (hostname, warehouse_id,
  token, optional base_url_override for mocked tests).
- New `Database::open_databricks(schema, config)` constructor in a
  separate cfg-gated impl block — keeps default builds unchanged
  while exposing the constructor when --features databricks is on.
- AGENTS.md documents the feature gate + binding regeneration recipe.

The token is held inside the Rust struct only; uniffi proxies it
across the FFI boundary by value. The pre-existing PAT redaction in
`DatabricksConfig::Debug` (PR #331) covers it on the Rust side; FFI
callers should treat the value as sensitive.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 16, 2026 07:16
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Exposes Databricks SQL Warehouse connectivity through the UniFFI bindings layer (Phase 4.4 of DeltaGraph). Adds a feature-gated DatabricksConfig record and Database::open_databricks() constructor that forward to the underlying clickgraph-embedded API landed in PR #331, plus AGENTS.md guidance on binding regeneration.

Changes:

  • Add databricks cargo feature to clickgraph-ffi, forwarding to clickgraph-embedded/databricks.
  • Define DatabricksConfig uniffi::Record and a cfg-gated Database::open_databricks(schema, config) constructor.
  • Document the feature gate and binding regeneration recipe in AGENTS.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
clickgraph-ffi/Cargo.toml Introduces the databricks feature, forwarding to the embedded crate.
clickgraph-ffi/src/lib.rs Adds the DatabricksConfig uniffi record and feature-gated open_databricks constructor.
clickgraph-ffi/AGENTS.md Documents the new feature-gated FFI surface and binding regeneration steps.

@genezhang genezhang merged commit 48f72d7 into main May 16, 2026
5 checks passed
@genezhang genezhang deleted the feat/ffi-databricks branch May 16, 2026 07:24
genezhang added a commit that referenced this pull request May 16, 2026
#334)

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
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.

2 participants