Skip to content

feat(rust): rust adbc snowflake driver#104

Draft
zeroshade wants to merge 75 commits intomainfrom
feat/rust-adbc-snowflake-driver
Draft

feat(rust): rust adbc snowflake driver#104
zeroshade wants to merge 75 commits intomainfrom
feat/rust-adbc-snowflake-driver

Conversation

@zeroshade
Copy link
Copy Markdown
Contributor

Adds a rust implementation using github.com/snowflakedb/universal-driver as the base

zeroshade and others added 30 commits March 24, 2026 11:30
Implement From<ApiError> trait to convert sf_core errors to adbc_core errors,
with exhaustive mapping of all 16 ApiError variants to appropriate Status codes.
Also add not_implemented() helper for NotImplemented errors.
- Add src/driver.rs: Inner struct (tokio Runtime + DatabaseDriverV1)
  and Driver wrapping Arc<Inner>, implementing adbc_core::Driver trait
- Add stub src/database.rs, src/connection.rs, src/statement.rs that
  compile with todo!() bodies for later tasks
- Update src/lib.rs to expose Driver, Database, Connection, Statement
- Fix arrow-array/schema version constraints to match adbc_core (57.x)
  to avoid duplicate crate instance trait bound failures
- Fix error.rs test to use public sf_core APIs instead of pub(crate)
  snafu builder internals (InvalidArgumentSnafu)
- Add .cargo/config.toml with prefer-dynamic=no to work around sf_core
  dylib linker issues when building test binaries

2 driver tests pass: driver_default_creates_successfully,
new_database_succeeds_with_no_options
Replaces the database.rs stub with full Optionable + adbc_core::Database
implementation: ADBC key → sf_core param mapping, URI parsing, and
new_connection_with_opts that propagates settings and calls connection_init.
Adds set_autocommit/execute_simple stubs to connection.rs for compilation.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Implements full connection.rs for Task 5: lifecycle (Drop),
set_autocommit/execute_simple helpers, Optionable (AutoCommit,
CurrentCatalog, CurrentSchema), and adbc_core::Connection methods
(new_statement, get_info, get_table_types, get_table_schema,
commit, rollback). Adds snowflake_type_to_arrow mapping for DESC TABLE
results. Also adds arrow-buffer v57 as a direct dep to resolve
version conflict with arrow-array v57 transitive dep.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Replace the incorrect List<Utf8> arm-5 placeholder in get_info() with a
proper empty MapArray (Map<Int32, List<Int32>>) so that RecordBatch::try_new
schema validation succeeds. Also fix the UnionFields arm-5 declaration from
Field::new_list to Field::new_map to match the adbc_core GET_INFO_SCHEMA.
The windows-latest runner doesn't have OpenSSL pre-installed in
the C:\Program Files\OpenSSL-Win64 directory anymore, causing
openssl-sys build to fail. Installing it via chocolatey fixes this.
@zeroshade zeroshade force-pushed the feat/rust-adbc-snowflake-driver branch from d7c085e to baa3e63 Compare March 30, 2026 18:50
…ation

- Correct artifact name in CI from `libadbc_snowflake.*` to `libadbc_driver_snowflake.*`.
- Add `rust/license.tpl` (converted to Handlebars for cargo-about).
- Add `rust/about.toml` with `[[...clarify.files]]` overrides for un-licensed snowflake local workspace/git dependencies and accept list for various open-source licenses.
The adbc-make check command copies the built .so to rust/build/,
not rust/target/release/. The previous path only captured .rlib
and .d files, causing empty package generation downstream.
The Rust driver returns 'UNAUTHENTICATED: Failed to login' not
'failed to auth'.
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