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/09/23 01:33:07 UTC

[GitHub] [arrow-datafusion] yahoNanJing commented on a diff in pull request #3584: Make ObjectStoreProvider fallible (return `Result` rather than `Option`)

yahoNanJing commented on code in PR #3584:
URL: https://github.com/apache/arrow-datafusion/pull/3584#discussion_r978203623


##########
datafusion/core/src/datasource/object_store.rs:
##########
@@ -83,9 +83,8 @@ impl std::fmt::Display for ObjectStoreUrl {
 
 /// Object store provider can detector an object store based on the url
 pub trait ObjectStoreProvider: Send + Sync + 'static {
-    /// Detector a suitable object store based on its url if possible
-    /// Return the key and object store
-    fn get_by_url(&self, url: &Url) -> Option<Arc<dyn ObjectStore>>;
+    /// Return an ObjectStore for the provided url based on its scheme and authority
+    fn get_by_url(&self, url: &Url) -> Result<Arc<dyn ObjectStore>>;

Review Comment:
   Better to change it to be Result<Option<Arc<dyn ObjectStore>>>



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