zeroshade commented on code in PR #3099:
URL: https://github.com/apache/arrow-adbc/pull/3099#discussion_r2185659695


##########
rust/core/src/driver_manager.rs:
##########
@@ -316,6 +408,65 @@ impl Driver for ManagedDriver {
     }
 }
 
+fn get_optional_key(manifest: &Table, key: &str) -> String {
+    manifest
+        .get(key)
+        .and_then(Value::as_str)
+        .unwrap_or_default()
+        .to_string()
+}
+
+fn load_driver_manifest(info: &mut DriverInfo) -> Result<()> {
+    let contents = 
fs::read_to_string(info.manifest_file.as_path()).map_err(|e| {
+        let file = info.manifest_file.to_string_lossy();
+        Error::with_message_and_status(
+            format!("Could not read manifest '{file}': {e}"),
+            Status::InvalidArguments,
+        )
+    })?;
+
+    let manifest = contents
+        .parse::<Table>()
+        .map_err(|e| Error::with_message_and_status(e.to_string(), 
Status::InvalidArguments))?;

Review Comment:
   Thanks for that! I was looking through it and just have two questions: 
   
   1. Is that maybe overkill given that we aren't looking to provide full 
manifest interactions, just a simple parse to get the shared lib path? 
   2. How do I modify that to express that the `shared` member could be 
*either* a string or a `map<string, string>` that maps platform triples to a 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to