rok commented on code in PR #46330:
URL: https://github.com/apache/arrow/pull/46330#discussion_r2081643701


##########
python/pyarrow/parquet/core.py:
##########
@@ -1825,7 +1826,15 @@ def read_table(source, *, columns=None, use_threads=True,
         filesystem, path = _resolve_filesystem_and_path(source, filesystem)
         if filesystem is not None:
             source = filesystem.open_input_file(path)
-        # TODO test that source is not a directory or a list
+        if not (
+            (isinstance(source, str) and not os.path.isdir(source))

Review Comment:
   What if source is a folder in an S3 bucket? 
[`os.path.isdir`](https://docs.python.org/3/library/os.path.html#os.path.isdir
   will return True for *existing* folder. Will it check through the s3 fs? 
That would add a network call. Can we just check if the string is a valid 
folder path?



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