[Data] Add save modes to file data sinks#52900
Merged
bveeramani merged 22 commits intoray-project:masterfrom May 12, 2025
Merged
[Data] Add save modes to file data sinks#52900bveeramani merged 22 commits intoray-project:masterfrom
bveeramani merged 22 commits intoray-project:masterfrom
Conversation
Co-authored-by: Balaji Veeramani <balaji@anyscale.com>
bveeramani
approved these changes
May 9, 2025
ran1995data
pushed a commit
to ran1995data/ray
that referenced
this pull request
May 13, 2025
<!-- Thank you for your contribution! Please review https://github.com/ray-project/ray/blob/master/CONTRIBUTING.rst before opening a pull request. --> <!-- Please add a reviewer to the assignee section when you create a PR. If you don't have the access to it, we will shortly find a reviewer and assign them to your PR. --> ## Why are these changes needed? <!-- Please give a short summary of the change and the problem this solves. --> In write_parquet, we want to be able to support - `OVERWRITE`: (If dir present, delete then write, otherwise, just create dir, then write) A more detailed description can be found in https://spark.apache.org/docs/latest/sql-data-sources-load-save-functions.html#save-modes This PR was meant to address https://anyscale1.atlassian.net/browse/DATA-946, but since the other save modes weren't that much work, I added the additional following 3 from apache spark too - `IGNORE`: (if dir present, silently pass) - `ERROR`: (if dir present, throw error) - `APPEND` (this is the current behavior we have, if dir present, we append files. Any conflicting file names are overwritten) ## Related issue number attentive requesting this <!-- For example: "Closes ray-project#1234" --> ## Checks - [ ] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [ ] I've run `scripts/format.sh` to lint the changes in this PR. - [ ] I've included any doc changes needed for https://docs.ray.io/en/master/. - [ ] I've added any new APIs to the API Reference. For example, if I added a method in Tune, I've added it in `doc/source/tune/api/` under the corresponding `.rst` file. - [ ] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ - Testing Strategy - [ ] Unit tests - [ ] Release tests - [ ] This PR is not tested :( --------- Co-authored-by: Balaji Veeramani <balaji@anyscale.com> Signed-off-by: weiran11 <weiran11@baidu.com>
|
The I have observed that you have already integrated the |
Member
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.
Why are these changes needed?
In write_parquet, we want to be able to support
OVERWRITE: (If dir present, delete then write, otherwise, just create dir, then write)A more detailed description can be found in https://spark.apache.org/docs/latest/sql-data-sources-load-save-functions.html#save-modes
This PR was meant to address https://anyscale1.atlassian.net/browse/DATA-946, but since the other save modes weren't that much work, I added the additional following 3 from apache spark too
IGNORE: (if dir present, silently pass)ERROR: (if dir present, throw error)APPEND(this is the current behavior we have, if dir present, we append files. Any conflicting file names are overwritten)Related issue number
attentive requesting this
Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/under thecorresponding
.rstfile.