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 2021/01/21 16:42:21 UTC

[GitHub] [arrow] jorisvandenbossche commented on a change in pull request #9284: ARROW-10370: [Python] Clean-up filesystem handling in write_dataset

jorisvandenbossche commented on a change in pull request #9284:
URL: https://github.com/apache/arrow/pull/9284#discussion_r562029994



##########
File path: python/pyarrow/tests/test_dataset.py
##########
@@ -1337,7 +1337,7 @@ def test_construct_from_single_file(tempdir):
     # instantiate from a single file with a filesystem object
     d2 = ds.dataset(path, filesystem=fs.LocalFileSystem())
     # instantiate from a single file with prefixed filesystem URI
-    d3 = ds.dataset(relative_path, filesystem=_filesystem_uri(directory))
+    d3 = ds.dataset(str(relative_path), filesystem=_filesystem_uri(directory))

Review comment:
       This change is needed because `relative_path` is a pathlib.Path object, but after this change, we only support that for actual LocalFilesystem, while here we have a SubtreeFilesystem. 
   I suppose that in theory I could check for SubtreeFilesystem that wraps LocalFilesystem as well (but not sure we want to encourage using pathlib.Path for relative paths, and when having an absolute path, you never need SubtreeFileSystem).




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