tustvold commented on code in PR #4200:
URL: https://github.com/apache/arrow-rs/pull/4200#discussion_r1191429938


##########
object_store/src/parse.rs:
##########
@@ -100,40 +114,41 @@ macro_rules! builder_opts {
                 Err(_) => builder,
             },
         );
-        Ok(Box::new(builder.build()?))
+        Box::new(builder.build()?) as _
     }};
 }
 
-/// Returns a [`ObjectStore`] for the provided `url`
-pub fn parse_url(url: &Url) -> Result<Box<dyn ObjectStore>, super::Error> {
+/// Create an [`ObjectStore`] based on the provided `url`
+///
+/// Returns
+/// - An [`ObjectStore`] of the corresponding type
+/// - The [`Path`] into the [`ObjectStore`] of the addressed resource
+pub fn parse_url(url: &Url) -> Result<(Box<dyn ObjectStore>, Path), 
super::Error> {

Review Comment:
   This signature is consistent with pyarrow 
[from_uri](https://arrow.apache.org/docs/python/generated/pyarrow.fs.FileSystem.html#pyarrow.fs.FileSystem.from_uri).
   
   It allows downstreams to determine whether they want the remaining path to 
be used to "namespace" the store, i.e. using `PrefixStore` (delta-rs), or just 
want the corresponding `ObjectStore` for the path (datafusion)



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