You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "CurtHagenlocher (via GitHub)" <gi...@apache.org> on 2026/05/21 02:33:01 UTC
[PR] fix(csharp): support spec-correct driver manifests [arrow-adbc]
CurtHagenlocher opened a new pull request, #4341:
URL: https://github.com/apache/arrow-adbc/pull/4341
Closes #4329
The driver manager was parsing every TOML file as a connection profile, so real driver manifests (with `manifest_version = 1` and a string `version`) were rejected with "The 'profile_version' field has an invalid value '1.5.2'. It must be an integer." Add a proper DriverManifest parser per docs/source/format/driver_manifests.rst, with [Driver.shared] as either a single string or a platform-tuple table.
Managed (.NET) driver selection moves from the C#-specific `driver_type` field on connection profiles to a scheme-prefixed entrypoint on the manifest: `dotnet:Type` for modern .NET, `netfx:Type` for .NET Framework. The host rejects a manifest whose scheme doesn't match its runtime, so mismatches fail with a clear error instead of an assembly-loader mystery. Profile-driven managed loading uses the same scheme via an `entrypoint` option in `[Options]`, which the driver manager consumes and does not forward to the driver.
Also aligns env_var placeholder support with the spec syntax `{{ env_var(NAME) }}` per docs/source/format/connection_profiles.rst: placeholders may be embedded anywhere in a value, repeated, missing vars expand to "" (matching the C/C++ driver manager), and unknown functions are rejected.
End-to-end coverage against DuckDB lives in
DriverManifestTests.FindLoadDriver_WithRealDriverManifest_LoadsDuckDbDriver.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(csharp): support spec-correct driver manifests [arrow-adbc]
Posted by "ianmcook (via GitHub)" <gi...@apache.org>.
ianmcook commented on code in PR #4341:
URL: https://github.com/apache/arrow-adbc/pull/4341#discussion_r3278571258
##########
csharp/src/Apache.Arrow.Adbc/readme.md:
##########
@@ -27,52 +27,87 @@ The `Apache.Arrow.Adbc.DriverManager` namespace provides a .NET implementation o
### Features
- **Driver discovery**: search for ADBC drivers by name across configurable directories (environment variable, user-level, system-level).
-- **TOML manifest loading**: locate drivers via `.toml` manifest files that specify the shared library path.
+- **TOML driver manifests**: locate drivers via `.toml` manifest files that specify the shared library path per platform.
- **Connection profiles**: load reusable connection configurations (driver + options) from `.toml` profile files.
+- **Managed (.NET) drivers**: load .NET drivers via a scheme-prefixed `entrypoint` (`dotnet:` for .NET 5+, `netfx:` for .NET Framework 4.x).
- **Custom profile providers**: plug in your own `IConnectionProfileProvider` implementation.
-### TOML Manifest / Profile Format
+### Driver Manifest Format
-#### Connection Profile Example (Snowflake)
+A *driver manifest* is a TOML file describing where a driver lives and how to load it. The format is shared across all ADBC driver-manager implementations and documented in `docs/source/format/driver_manifests.rst`.
-For unmanaged drivers loaded from native shared libraries:
+#### Native Driver Manifest Example (Snowflake)
```toml
-profile_version = 1
-driver = "libadbc_driver_snowflake"
+manifest_version = 1
+
+name = "Snowflake"
+version = "1.5.2"
+publisher = "snowflake.com"
+
+[Driver]
entrypoint = "AdbcDriverSnowflakeInit"
+[Driver.shared]
+windows_amd64 = "C:\\path\\to\\adbc_driver_snowflake.dll"
+linux_amd64 = "/usr/local/lib/libadbc_driver_snowflake.so"
+macos_arm64 = "/opt/homebrew/lib/libadbc_driver_snowflake.dylib"
+```
+
+#### Managed Driver Manifest Example (BigQuery)
+
+Managed .NET drivers use a scheme-prefixed `entrypoint`:
+
+- `dotnet:` for modern .NET (.NET 5 and later, including .NET 8 / .NET 10)
+- `netfx:` for .NET Framework 4.x
+
+The host process rejects a manifest whose scheme doesn't match its runtime, so a `dotnet:` manifest on a .NET Framework process (or vice versa) fails with a clear error rather than mysteriously failing inside the assembly loader.
Review Comment:
Thanks Curt, looks reasonable to me.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(csharp): support spec-correct driver manifests [arrow-adbc]
Posted by "CurtHagenlocher (via GitHub)" <gi...@apache.org>.
CurtHagenlocher merged PR #4341:
URL: https://github.com/apache/arrow-adbc/pull/4341
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(csharp): support spec-correct driver manifests [arrow-adbc]
Posted by "CurtHagenlocher (via GitHub)" <gi...@apache.org>.
CurtHagenlocher commented on code in PR #4341:
URL: https://github.com/apache/arrow-adbc/pull/4341#discussion_r3278335771
##########
csharp/src/Apache.Arrow.Adbc/readme.md:
##########
@@ -27,52 +27,87 @@ The `Apache.Arrow.Adbc.DriverManager` namespace provides a .NET implementation o
### Features
- **Driver discovery**: search for ADBC drivers by name across configurable directories (environment variable, user-level, system-level).
-- **TOML manifest loading**: locate drivers via `.toml` manifest files that specify the shared library path.
+- **TOML driver manifests**: locate drivers via `.toml` manifest files that specify the shared library path per platform.
- **Connection profiles**: load reusable connection configurations (driver + options) from `.toml` profile files.
+- **Managed (.NET) drivers**: load .NET drivers via a scheme-prefixed `entrypoint` (`dotnet:` for .NET 5+, `netfx:` for .NET Framework 4.x).
- **Custom profile providers**: plug in your own `IConnectionProfileProvider` implementation.
-### TOML Manifest / Profile Format
+### Driver Manifest Format
-#### Connection Profile Example (Snowflake)
+A *driver manifest* is a TOML file describing where a driver lives and how to load it. The format is shared across all ADBC driver-manager implementations and documented in `docs/source/format/driver_manifests.rst`.
-For unmanaged drivers loaded from native shared libraries:
+#### Native Driver Manifest Example (Snowflake)
```toml
-profile_version = 1
-driver = "libadbc_driver_snowflake"
+manifest_version = 1
+
+name = "Snowflake"
+version = "1.5.2"
+publisher = "snowflake.com"
+
+[Driver]
entrypoint = "AdbcDriverSnowflakeInit"
+[Driver.shared]
+windows_amd64 = "C:\\path\\to\\adbc_driver_snowflake.dll"
+linux_amd64 = "/usr/local/lib/libadbc_driver_snowflake.so"
+macos_arm64 = "/opt/homebrew/lib/libadbc_driver_snowflake.dylib"
+```
+
+#### Managed Driver Manifest Example (BigQuery)
+
+Managed .NET drivers use a scheme-prefixed `entrypoint`:
+
+- `dotnet:` for modern .NET (.NET 5 and later, including .NET 8 / .NET 10)
+- `netfx:` for .NET Framework 4.x
+
+The host process rejects a manifest whose scheme doesn't match its runtime, so a `dotnet:` manifest on a .NET Framework process (or vice versa) fails with a clear error rather than mysteriously failing inside the assembly loader.
Review Comment:
@ianmcook, @davidhcoe, @esadek I've taken the liberty to amend the Driver Manager spec to accommodate drivers which are .NET assemblies and non-AOT compiled. This scheme could further be generalized to e.g. reference a .jar file or a Python-based implementation, if there ever were such a thing. Use of a scheme here is a backwards-compatible way to tell the driver manager how to consume the driver -- or perhaps that it is unable to. One could imagine (implausible as it likely is) that the C++ driver manager could see `dotnet:` and try to load the .NET runtime to load the driver. And of course, a naive examination of the entrypoint as written would fail to find the symbol in the library.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org