Repository navigation
Conversation
Signed-off-by: viiccwen <[email protected]>
Signed-off-by: viiccwen <[email protected]>
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the docstring of the sort method in python/ray/data/dataset.py to clarify that the dataset is sorted by one or more key columns instead of a key column or key function. There are no review comments, and I have no feedback to provide.
Contributor
Author
|
Consolidated into #66927 per review feedback that these changes are too small to land separately. |
owenowenisme
added a commit
that referenced
this pull request
Nov 14, 2026
#66927) ## Description Fixes two Ray Data docstrings that don't match how the code actually behaves, and adds a test for the behavior the corrected docstring describes. - **`read_json(lines=True)`**: the docstring said `filesystem`, `arrow_open_stream_args`, and `arrow_json_args` are *ignored* in this mode. In fact `read_json` raises `ValueError` if any of them is set. The docstring now says they aren't supported. - **`Dataset.sort()`**: the summary line said the dataset can be sorted by a "key function", but `key` is typed as `Union[str, List[str]]` and callables aren't accepted. The summary now says "one or more key columns". - **Test**: adds `test_jsonl_rejects_unsupported_args`, a parametrized test checking that each of the three arguments raises `ValueError` when `lines=True`. Nothing covered this before. - Removes a trailing space from that `ValueError` message. This consolidates #66926 into this PR, following review feedback that the two changes were too small to send separately. ## Related issues Supersedes #66926. ## Additional information I used AI assistance to prepare this change. I reviewed every changed line and ran the tests above myself. --------- Signed-off-by: viiccwen <[email protected]> Co-authored-by: You-Cheng Lin <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Clarifies the
Dataset.sort()docstring to state that sorting is performed by the specified one or more key columns.This aligns the public documentation with the supported
key: Union[str, List[str]]API and avoids implying that a callable key function is accepted.Related issues
Additional information