Copilot commented on code in PR #4815:
URL: https://github.com/apache/arrow-adbc/pull/4815#discussion_r4158609841
##########
csharp/src/Apache.Arrow.Adbc/DriverManager/AdbcDriverManager.cs:
##########
@@ -132,7 +134,12 @@ private static AdbcDriver LoadNativeDriver(string
driverPath, string? entrypoint
typeName: null,
manifestPath: null,
loadMethod: loadMethod,
- () => CAdbcDriverImporter.Load(driverPath,
resolvedEntrypoint));
+ () => entrypoint == null
+ ? CAdbcDriverImporter.LoadWithFallback(
+ driverPath,
+ resolvedEntrypoint,
+ DefaultNativeEntrypoint)
+ : CAdbcDriverImporter.Load(driverPath,
resolvedEntrypoint));
Review Comment:
This fallback is limited to paths that reach `LoadNativeDriver`. A manifest
without `[Driver].entrypoint` still derives a symbol in `LoadFromManifest` and
then calls the non-fallback `CAdbcDriverImporter.Load` via
`LoadByEntrypointScheme`; `FindLoadDriver("clickhouse")` prefers such
manifests, matching the issue's reproduction, so that path remains broken.
Preserve whether the entrypoint came from the caller/manifest and use
`LoadWithFallback` when it was filename-derived; explicit caller- and
manifest-provided symbols should remain authoritative.
##########
csharp/test/AotInterop/Apache.Arrow.Adbc.TestFixture.Tests/AotFixtureTests.cs:
##########
@@ -63,6 +63,32 @@ public void DriverNegotiatesV1_1_0()
Assert.Equal(AdbcVersion.Version_1_1_0, driver.DriverVersion);
}
+ [SkippableFact]
+ public void DriverManagerFallsBackToStandardEntrypoint()
+ {
+ string fixturePath = ResolveFixturePath()!;
+ string directory =
Path.Combine(Path.GetDirectoryName(fixturePath)!, Guid.NewGuid().ToString("N"));
Review Comment:
`[SkippableFact]` does not skip by itself. When `ADBC_TEST_AOT_FIXTURE_PATH`
is unset or invalid, `ResolveFixturePath()` returns null; the null-forgiving
operator has no runtime effect, so `Path.GetDirectoryName` throws instead of
skipping as the fixture contract and PR description require. Add the same
`Skip.IfNot` guard used by `LoadFixture` before using the path.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]