You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/01/12 19:29:39 UTC

[GitHub] [arrow-datafusion] houqp commented on a change in pull request #1541: Replace Datafusion Error with Generic Error for Object store

houqp commented on a change in pull request #1541:
URL: https://github.com/apache/arrow-datafusion/pull/1541#discussion_r783382875



##########
File path: datafusion/src/error.rs
##########
@@ -101,6 +104,12 @@ impl From<ParserError> for DataFusionError {
     }
 }
 
+impl From<Box<dyn Error + Send + Sync>> for DataFusionError {
+    fn from(err: Box<dyn Error + Send + Sync>) -> Self {
+        DataFusionError::External(err)
+    }
+}
+

Review comment:
       I was referring to something like this `let mut reader = obj_reader?.sync_reader().map_err(DatafusionError::from)?;` so the low level functions that call these object store apis can hide the Error trait objects from their callers.




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