rmnskb commented on code in PR #48008:
URL: https://github.com/apache/arrow/pull/48008#discussion_r2484787256
##########
python/pyarrow/parquet/core.py:
##########
@@ -1887,10 +1887,23 @@ def read_table(source, *, columns=None,
use_threads=True,
"the 'schema' argument is not supported when the "
"pyarrow.dataset module is not available"
)
+ if isinstance(source, list):
+ raise ValueError(
+ "the 'source' argument cannot be a list of files "
+ "when the pyarrow.dataset is not available"
+ )
+
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
+ try:
+ source = filesystem.open_input_file(path)
+ except (OSError, FileNotFoundError) as e:
Review Comment:
Yep, you're right, changed the file check to this approach
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]