GH-42173: [R][S3] Writing partitionned dataset with Rarrow on S3 failed if ListBucket is not allowed for the user #47599
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.
…d if ListBucket is not allowed for the user
Thanks for opening a pull request!
Rationale for this change
This PR gives the user to choose not to create directory in the bucket before writing dataset.
In case the
create_directory
option is set to FALSE, no verification will be made by R arrow.The S3 storage will itself verify if the directory exists and if the users has the rigth to modify it.
This way no
ListBucket
orHeadBucket
are necessary to achieve the write operation.What changes are included in this PR?
create_directory
is now available to the user in thewrite_dataset
function.Before this PR, this option was automatically set to TRUE (by default).
Are these changes tested?
Yes
Are there any user-facing changes?
No, the default value for
create_directory
is still TRUE.This PR includes breaking changes to public APIs. (If there are any breaking changes to public APIs, please explain which changes are breaking. If not, you can remove this.)
N/A
This PR contains a "Critical Fix". (If the changes fix either (a) a security vulnerability, (b) a bug that caused incorrect or invalid data to be produced, or (c) a bug that causes a crash (even when the API contract is upheld), please provide explanation. If not, you can remove this.)
N/A