feat(ffi): expose Database::open_databricks() behind databricks feature#333
Merged
Conversation
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>
There was a problem hiding this comment.
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
databrickscargo feature toclickgraph-ffi, forwarding toclickgraph-embedded/databricks. - Define
DatabricksConfiguniffi::Record and a cfg-gatedDatabase::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
added a commit
that referenced
this pull request
May 16, 2026
#334) Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/Connectionshape they already know.databrickscargo feature onclickgraph-ffithat forwards throughclickgraph-embeddedto the upstream executor.DatabricksConfiguniffi::Record +Database::open_databricks(schema, config)constructor (in a cfg-gated impl block, so default builds are unchanged).Python
_ffi.pyand 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 unchangedcargo build -p clickgraph-ffi --features databricks— adds Databricks symbolcargo clippy -p clickgraph-ffi --features databricks --all-targets— cleanDatabase::new_databricksalready covered by 3 wiremock-based e2e tests inclickgraph-embedded(PR feat(embedded): Database::new_databricks() + dialect plumbing (Phase 2.2b) #331)🤖 Generated with Claude Code