-
Notifications
You must be signed in to change notification settings - Fork 7k
[Data] Add save modes to file data sinks #52900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Data] Add save modes to file data sinks #52900
Conversation
Co-authored-by: Balaji Veeramani <balaji@anyscale.com>
<!-- 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 |
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.