crepererum commented on issue #384:
URL: 
https://github.com/apache/arrow-rs-object-store/issues/384#issuecomment-2916056983

   I think the issue here is similar to the `std::fs` story: while most people 
probably want the clean UTF8 `String`, that's not what the OS uses and hence 
there's an `OsString`. `std` however has one luxury: it's only ever compiled 
for one single OS, and hence `OsString` is a single type. That is not true for 
`object_store`: we need to deal with all kind of storage providers and we kinda 
settled on the lowest common denominator for paths.
   
   Other designs have different trade-offs, e.g.: we could make `Path` super 
loose (basically just use `Bytes` or `String`) and check the validity whenever 
it is passed to the respective `ObjectStore` implementation. That however makes 
the type rather useless and use would never know if a path is valid or not 
before checking it with an `ObjectStore`. We could at least offer a 
`is_path_valid` method, but given how weird some stores / providers are, I bet 
you'll need to make that `async`/IO-driven as well.


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