Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for storage_options in read_parquet, allowing users to configure S3 connection options (such as credentials and custom endpoints) when reading Parquet files. It adds validation to ensure storage_options is only used with S3 paths and is mutually exclusive with the filesystem parameter, along with corresponding unit tests. The review feedback correctly identifies a redundant local import of pathlib in the newly added _filesystem_from_storage_options function that should be removed.
…e_options Review feedback from gemini-code-assist on ray-project#68208.
…e_options Review feedback from gemini-code-assist on ray-project#68208. Signed-off-by: lhjnano <[email protected]>
727c27c to
a230d03
Compare
…e_options Review feedback from gemini-code-assist on ray-project#68208. Signed-off-by: lhjnano <[email protected]> Signed-off-by: lhjnano <[email protected]>
a230d03 to
bd9dee2
Compare
bd9dee2 to
edb0a68
Compare
2d77cb6 to
99435c0
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 99435c0. Configure here.
When filesystem is None and storage_options is provided for s3:// paths, build the filesystem via pyarrow.fs.S3FileSystem(**storage_options) so connection options (credentials, endpoint_override for private S3-compatible endpoints) reach path resolution instead of being silently swallowed. storage_options and filesystem are mutually exclusive. Fixes ray-project#68206 Signed-off-by: lhjnano <[email protected]>
99435c0 to
a4abb50
Compare

Description
Adds
storage_optionstoray.data.read_parquet(). WhenfilesystemisNoneandstorage_optionsis provided fors3://paths, the filesystem is built viapyarrow.fs.S3FileSystem(**storage_options), so connection options (credentials,region,endpoint_overridefor private S3-compatible endpoints such as MinIO) now reach the path-resolution/listing stage instead of being silently swallowed.storage_optionsandfilesystemare mutually exclusive. Follows the existingstorage_optionsAPI precedent inread_hudi/read_lance/read_delta.Related issues
Fixes #68206
Additional information
_filesystem_from_storage_options()inpython/ray/data/datasource/path_util.py(s3://only for now; other schemes raise aValueErrordirecting users tofilesystem=).read_parquet()before the V1/V2 datasource split, so both paths benefit.python/ray/data/tests/datasource/test_parquet.py: construction passthrough (mockedS3FileSystem),filesystem+storage_optionsconflict, and non-S3 scheme rejection — no network or S3 required.