Skip to content

[Data] Support storage_options in read_parquet() - #68208

Closed
lhjnano wants to merge 1 commit into
ray-project:masterfrom
lhjnano:data-read-parquet-storage-options
Closed

lhjnano wants to merge 1 commit into
ray-project:masterfrom
lhjnano:data-read-parquet-storage-options

Conversation

@lhjnano

@lhjnano lhjnano commented Nov 16, 2026

Copy link
Copy Markdown

Description

Adds storage_options to ray.data.read_parquet(). When filesystem is None and storage_options is provided for s3:// paths, the filesystem is built via pyarrow.fs.S3FileSystem(**storage_options), so connection options (credentials, region, endpoint_override for private S3-compatible endpoints such as MinIO) now reach the path-resolution/listing stage instead of being silently swallowed. storage_options and filesystem are mutually exclusive. Follows the existing storage_options API precedent in read_hudi / read_lance / read_delta.

Related issues

Fixes #68206

Additional information

  • New helper _filesystem_from_storage_options() in python/ray/data/datasource/path_util.py (s3:// only for now; other schemes raise a ValueError directing users to filesystem=).
  • The hook resolves the filesystem once in read_parquet() before the V1/V2 datasource split, so both paths benefit.
  • Tests added in python/ray/data/tests/datasource/test_parquet.py: construction passthrough (mocked S3FileSystem), filesystem+storage_options conflict, and non-S3 scheme rejection — no network or S3 required.

@lhjnano
lhjnano requested a review from a team as a code owner November 16, 2026 17:37

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread python/ray/data/datasource/path_util.py Resolved
@ray-gardener ray-gardener Bot added data Ray Data-related issues community-contribution Contributed by the community labels Nov 16, 2026
lhjnano added a commit to lhjnano/ray that referenced this pull request Nov 16, 2026
lhjnano added a commit to lhjnano/ray that referenced this pull request Nov 16, 2026
…e_options

Review feedback from gemini-code-assist on ray-project#68208.

Signed-off-by: lhjnano <[email protected]>
@lhjnano
lhjnano force-pushed the data-read-parquet-storage-options branch from 727c27c to a230d03 Compare November 16, 2026 23:05
lhjnano added a commit to lhjnano/ray that referenced this pull request Nov 16, 2026
…e_options

Review feedback from gemini-code-assist on ray-project#68208.

Signed-off-by: lhjnano <[email protected]>
Signed-off-by: lhjnano <[email protected]>
@lhjnano
lhjnano force-pushed the data-read-parquet-storage-options branch from a230d03 to bd9dee2 Compare November 16, 2026 23:07

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread python/ray/data/datasource/path_util.py Resolved
@lhjnano
lhjnano force-pushed the data-read-parquet-storage-options branch from bd9dee2 to edb0a68 Compare November 16, 2026 23:14

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread python/ray/data/read_api.py Resolved
@lhjnano
lhjnano force-pushed the data-read-parquet-storage-options branch 4 times, most recently from 2d77cb6 to 99435c0 Compare November 17, 2026 02:29

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit 99435c0. Configure here.

Comment thread python/ray/data/datasource/path_util.py Resolved
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]>
@lhjnano

lhjnano commented Nov 19, 2026

Copy link
Copy Markdown
Author

Closing in favor of #68235 — it covers the read_parquet() case from #68206 and the broader read/write APIs plus centralized s3_filesystem_defaults. The s3a alias and case-insensitive scheme handling discussed here are already included there (874b99e). Thanks!

@lhjnano lhjnano closed this Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Contributed by the community data Ray Data-related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Data] read_parquet() ignores S3 endpoint_override in storage_options

1 participant