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 2020/07/07 12:45:09 UTC

[GitHub] [arrow] martindurant commented on a change in pull request #7545: ARROW-9139: [Python] Switch parquet.read_table to use new datasets API by default

martindurant commented on a change in pull request #7545:
URL: https://github.com/apache/arrow/pull/7545#discussion_r450835383



##########
File path: python/pyarrow/fs.py
##########
@@ -63,6 +63,31 @@ def __getattr__(name):
     )
 
 
+def _ensure_filesystem(filesystem, use_mmap=False):
+    if isinstance(filesystem, FileSystem):
+        return filesystem
+
+    # handle fsspec-compatible filesystems
+    try:
+        import fsspec
+        if isinstance(filesystem, fsspec.AbstractFileSystem):

Review comment:
       Agree completely. So far, all implementations II know about are subclasses, but it's not required. I have not yet got around to implementing an entrypoints way to declare implementations. 
   So, you could try to look for some specific methods, but I'm not sure what we could guarantee was specific to fsspec.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org