Skip to content

[Data] Document V1 fallback in read_orc - #67063

Merged
richardliaw merged 3 commits into
ray-project:masterfrom
jiangxt2:docs/read-orc-v1-fallback
Oct 27, 2026
Merged

richardliaw merged 3 commits into
ray-project:masterfrom
jiangxt2:docs/read-orc-v1-fallback

Conversation

@jiangxt2

@jiangxt2 jiangxt2 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Description

Document the V1 fallback in ray.data.read_orc() for users who encounter DataSourceV2 limitations. The API note leads with ray.data.DataContext.get_current().use_datasource_v2 = False, which can be set after importing Ray and before calling read_orc(). It also documents RAY_DATA_USE_DATASOURCE_V2=0 before importing Ray. The shared setting affects read_parquet() as well.

This is the non-blocking documentation follow-up requested in #66524.

Related issues

Fixes #67062.

Additional information

  • This PR addresses the documentation task tracked by [Data] Document the V1 fallback in read_orc API docs #67062; no open PR for this issue was found.
  • Documentation-only change; runtime behavior is unchanged.
  • Validation: pre-commit run --files python/ray/data/read_api.py and python3 ci/pipeline/check-test-run.py passed; Semgrep reported zero findings for python/ray/data/read_api.py.
  • Runtime tests were not run. The pre-push hook mapped test_delta_sharing.py, test_datasource_v2.py, and test_orc_datasource_v2.py as manual because Ray could not be imported without _raylet.so in this worktree.
  • The targeted Sphinx build could not run because sphinx-build is unavailable.
  • AI assistance was used to prepare this change.

@jiangxt2
jiangxt2 marked this pull request as ready for review October 15, 2026 06:58
@jiangxt2
jiangxt2 requested a review from a team as a code owner October 15, 2026 06:58
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@ray-gardener ray-gardener Bot added docs An issue or change related to documentation data Ray Data-related issues community-contribution Contributed by the community labels Oct 15, 2026
Comment thread python/ray/data/read_api.py Outdated
It samples file schemas and may omit columns absent from the sample.
If you encounter a DataSourceV2 limitation, set
``RAY_DATA_USE_DATASOURCE_V2=0`` before importing Ray to use the V1
reader. This shared setting also affects ``read_parquet()``.

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.

Thanks — verified all three claims against master and they're accurate (the env var is read
into a module constant at import, default is True, and exactly parquet + orc gate on it).

One small ask before merge:

Lead with the programmatic form, which works even after Ray is imported. The env var only takes effect if set before import ray, so a notebook user has no working recipe from this note as written. The codebase's own error messages already use both forms (see the merge_schema error above: DataContext.get_current().use_datasource_v2 = ... "(or set
RAY_DATA_USE_DATASOURCE_V2=...)"). Something like:

   If you encounter a DataSourceV2 limitation, use the V1 reader by setting
   ``ray.data.DataContext.get_current().use_datasource_v2 = False``, or
   ``RAY_DATA_USE_DATASOURCE_V2=0`` in the environment before importing Ray.
   This shared setting also affects ``read_parquet()``.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestion. I updated the read_orc() note to lead with the programmatic DataContext setting, which works after Ray is imported, and retained the environment-variable option for use before importing Ray. I also noted that the shared setting affects read_parquet().

@abhishekverma-ray abhishekverma-ray 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.

Added a suggestion, please check.

@richardliaw richardliaw added the go add ONLY when ready to merge, run all tests label Oct 22, 2026
@richardliaw
richardliaw merged commit 093e844 into ray-project:master Oct 27, 2026
7 checks passed
@jiangxt2
jiangxt2 deleted the docs/read-orc-v1-fallback branch October 27, 2026 06:12
justinyeh1995 pushed a commit to justinyeh1995/ray that referenced this pull request Oct 28, 2026
## Description
Document the V1 fallback in `ray.data.read_orc()` for users who
encounter DataSourceV2 limitations. The API note leads with
`ray.data.DataContext.get_current().use_datasource_v2 = False`, which
can be set after importing Ray and before calling `read_orc()`. It also
documents `RAY_DATA_USE_DATASOURCE_V2=0` before importing Ray. The
shared setting affects `read_parquet()` as well.

This is the non-blocking documentation follow-up requested in
[ray-project#66524](ray-project#66524 (comment)).

## Related issues
Fixes ray-project#67062.

## Additional information
- This PR addresses the documentation task tracked by ray-project#67062; no open PR
for this issue was found.
- Documentation-only change; runtime behavior is unchanged.
- Validation: `pre-commit run --files python/ray/data/read_api.py` and
`python3 ci/pipeline/check-test-run.py` passed; Semgrep reported zero
findings for `python/ray/data/read_api.py`.
- Runtime tests were not run. The pre-push hook mapped
`test_delta_sharing.py`, `test_datasource_v2.py`, and
`test_orc_datasource_v2.py` as manual because Ray could not be imported
without `_raylet.so` in this worktree.
- The targeted Sphinx build could not run because `sphinx-build` is
unavailable.
- AI assistance was used to prepare this change.

---------

Signed-off-by: jiangxt2 <[email protected]>
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 docs An issue or change related to documentation go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Data] Document the V1 fallback in read_orc API docs

3 participants