lidavidm commented on code in PR #3694:
URL: https://github.com/apache/arrow-adbc/pull/3694#discussion_r2536058522
##########
python/adbc_driver_bigquery/adbc_driver_bigquery/__init__.py:
##########
@@ -224,7 +224,9 @@ def connect(
Initial database connection parameters.
"""
kwargs = (db_kwargs or {}).copy()
- return adbc_driver_manager.AdbcDatabase(driver=_driver_path(), **kwargs)
+ dpath = _driver_path()
+ print(f"Using BigQuery ADBC driver at: {dpath}")
Review Comment:
Did you mean to leave this in?
##########
rust/driver_manager/src/lib.rs:
##########
@@ -1876,6 +1917,31 @@ fn get_search_paths(lvls: LoadFlags) -> Vec<PathBuf> {
result
}
+fn parse_driver_uri(uri: &str) -> Result<(&str, &str)> {
+ let idx = uri.find(":").ok_or(Error::with_message_and_status(
+ format!("Invalid URI: {uri}"),
+ Status::InvalidArguments,
+ ))?;
+
+ let driver = &uri[..idx];
+ if uri.len() <= idx + 2 {
+ return Ok((driver, uri));
+ }
+
+ #[cfg(target_os = "windows")]
+ match std::fs::exists(uri) {
+ Ok(true) => return Ok((uri, "")),
+ _ => {}
+ }
Review Comment:
```suggestion
#[cfg(target_os = "windows")]
if let Ok(true) = std::fs::exists(uri) {
return Ok((uri, ""));
}
```
--
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]