FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GH-42173: [R][C++] Writing partitioned dataset on S3 fails if ListBucket is not allowed for the user by simonelbaz · Pull Request #47599 · apache/arrow · GitHub

/ arrow Public

GH-42173: [R][C++] Writing partitioned dataset on S3 fails if ListBucket is not allowed for the user - #47599

Merged
pitrou merged 4 commits into
apache:mainfrom
simonelbaz:issue42173
Oct 21, 2025
Merged

GH-42173: [R][C++] Writing partitioned dataset on S3 fails if ListBucket is not allowed for the user#47599
pitrou merged 4 commits into
apache:mainfrom
simonelbaz:issue42173

Conversation

simonelbaz commented Sep 18, 2025
edited by pitrou
Loading

Copy link
Copy Markdown
Contributor

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 or HeadBucket are necessary to achieve the write operation.

df |> arrow::write_dataset(
  minio$path(paste0("smartsla-bucket/rarrow/")),
  partitioning = "qualitative",
  create_directory = FALSE,
  format = "parquet"
)

What changes are included in this PR?

create_directory is now available to the user in the write_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.

Copy link
Copy Markdown

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

See also:

simonelbaz changed the title [ISSUE 42173][R] Writing partitionned dataset with Rarrow on S3 failed if ListBucket is not allowed for the user [GH-42173][R] Writing partitionned dataset with Rarrow on S3 failed if ListBucket is not allowed for the user Sep 18, 2025
simonelbaz changed the title [GH-42173][R] Writing partitionned dataset with Rarrow on S3 failed if ListBucket is not allowed for the user GH-42173: [R] Writing partitionned dataset with Rarrow on S3 failed if ListBucket is not allowed for the user Sep 18, 2025

Copy link
Copy Markdown

⚠️ GitHub issue #42173 has been automatically assigned in GitHub to PR creator.

simonelbaz changed the title GH-42173: [R] Writing partitionned dataset with Rarrow on S3 failed if ListBucket is not allowed for the user GH-42173: [R][S3] Writing partitionned dataset with Rarrow on S3 failed if ListBucket is not allowed for the user Sep 18, 2025

Copy link
Copy Markdown

⚠️ GitHub issue #42173 has been automatically assigned in GitHub to PR creator.

simonelbaz marked this pull request as draft September 18, 2025 21:08
simonelbaz marked this pull request as ready for review September 25, 2025 08:07

Copy link
Copy Markdown
Contributor Author

Hi,

@jonkeane @thisisnic thanks for any comment || review

thisisnic changed the title GH-42173: [R][S3] Writing partitionned dataset with Rarrow on S3 failed if ListBucket is not allowed for the user GH-42173: [R][C++] Writing partitioned dataset with S3 fails if ListBucket is not allowed for the user Oct 13, 2025

Copy link
Copy Markdown

⚠️ GitHub issue #42173 has been automatically assigned in GitHub to PR creator.

thisisnic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks for making this PR @simonelbaz! I've given it a look over, and it looks like there's an existing option for this scenario that might be a better solution, though I haven't tried it out myself - let me know what you think.

Comment thread cpp/src/arrow/dataset/dataset_writer.cc Outdated
thisisnic changed the title GH-42173: [R][C++] Writing partitioned dataset with S3 fails if ListBucket is not allowed for the user GH-42173: [R][C++] Writing partitioned dataset on S3 fails if ListBucket is not allowed for the user Oct 13, 2025

Copy link
Copy Markdown

⚠️ GitHub issue #42173 has been automatically assigned in GitHub to PR creator.

Comment thread r/R/dataset-write.R
Comment thread cpp/src/arrow/dataset/dataset_writer.cc Outdated
…3 failed if ListBucket is not allowed for the user
github-actions Bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Oct 16, 2025
Comment thread r/R/dataset-write.R Outdated
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
simonelbaz requested a review from pitrou October 16, 2025 09:32

pitrou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

+1 from me. @thisisnic Are you ok with the new argument name and docstring?

Copy link
Copy Markdown
Contributor Author

Hi @thisisnic, thanks for any feedback or comment on the PR.

thisisnic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Great, thanks!

github-actions Bot added awaiting merge Awaiting merge and removed awaiting committer review Awaiting committer review labels Oct 21, 2025
pitrou merged commit b808fbb into apache:main Oct 21, 2025
11 of 12 checks passed
pitrou removed the awaiting merge Awaiting merge label Oct 21, 2025

Copy link
Copy Markdown

⚠️ GitHub issue #42173 has been automatically assigned in GitHub to PR creator.

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit b808fbb.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 8 possible false positives for unstable benchmarks that are known to sometimes produce them.

zanmato1984 pushed a commit to zanmato1984/arrow that referenced this pull request Nov 5, 2025
…istBucket is not allowed for the user (apache#47599)

### 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`  or ` HeadBucket`  are necessary to achieve the write operation. 

``` 
df |> arrow::write_dataset(
  minio$path(paste0("smartsla-bucket/rarrow/")),
  partitioning = "qualitative",
  create_directory = FALSE,
  format = "parquet"
)
```

### What changes are included in this PR?

`create_directory` is now available to the user in the `write_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.

* GitHub Issue: apache#42173

Lead-authored-by: Simon ELBAZ <elbazsimon9@gmail.com>
Co-authored-by: Simon Elbaz <elbazsimon9@gmail.com>
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
Signed-off-by: Antoine Pitrou <antoine@python.org>
Mottl pushed a commit to Mottl/arrow that referenced this pull request May 26, 2026
…istBucket is not allowed for the user (apache#47599)

### 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`  or ` HeadBucket`  are necessary to achieve the write operation. 

``` 
df |> arrow::write_dataset(
  minio$path(paste0("smartsla-bucket/rarrow/")),
  partitioning = "qualitative",
  create_directory = FALSE,
  format = "parquet"
)
```

### What changes are included in this PR?

`create_directory` is now available to the user in the `write_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.

* GitHub Issue: apache#42173

Lead-authored-by: Simon ELBAZ <elbazsimon9@gmail.com>
Co-authored-by: Simon Elbaz <elbazsimon9@gmail.com>
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
Signed-off-by: Antoine Pitrou <antoine@python.org>
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL