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


##########
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:
   given we have three people in favor of removing serde and using the original 
logic, I'm gonna switch back to that unless someone objects.



-- 
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]

Reply via email to