-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
removing fsspec in python in favour of object_store in rust #11056
Comments
Why not have one method, and based on that you invoke the object store? Because object_store can also be used for local files, same as fsspec. |
Even better. I just don't know the capabilities of rust :'( |
Agree, I vote for merging |
I got this on my todo list. Will look into this a bit later. |
For correctness: These are actually handled by Polars itself and not by ObjectStore. c.f. polars-io/src/cloud/gloub.rs.
I don't know fsspec in detail, but ObjectStore only handles absolute paths, and local paths need to be prefixed by |
People here might be interested: I wrote Is polars already using fsspec in an async way? If you use |
Description
Hi @ritchie46 ,
I was in discussion with @Qqwy about the following:
Within rust we have now the
*_cloud
methods for sinking to a cloud service via object_store.Is it an idea to generalize every call to the read/scan/write methods to make use of object_store instead of relying (on the python side) on fsspec?
My idea is this:
Within the Python API I would combine these 2 with a default parameter for the cloud options that could optionally be passed in for cloud paths. Sadly the same is not possible in Rust.
My only issue was with globs: how to handle these, but it seems (Qqwy checked it) that these are handled by object_store as well. So we're fine there.
Second what Qqwy brought up was that there are methods like
parse_url
that parses a given uri tries to figure out what you're trying to do. [And relative paths are not supported].==> For the parse_url & glob logic he concluded that it's already present in polars/object_store.
My ultimate wish for the "file interface api" would be that there is struct that accepts a list of writable/readable streams and does whatever it needs doing for the specific filetype.
If that's done, then any kind of file format could be easily implemented as the ability to read/write from a stream. All the other code would be boilerplate.
My question for this ticket is: what is your view on the API?
(and secondary: is this überhaupt possible in rust?)
Thanks
The text was updated successfully, but these errors were encountered: