adamreeve opened a new pull request, #55423: URL: https://github.com/apache/arrow/pull/55423
### Rationale for this change ### What changes are included in this PR? When writing a dataset with `DirectoryPartitioning` or `FilenamePartitioning`, respect the `segment_encoding` parameter and use URI encoding if it is enabled. Note that it's enabled by default, so this changes the default behaviour. Previously the `segment_encoding` parameter was only used when reading. ### Are these changes tested? Yes, this includes new unit tests. ### Are there any user-facing changes? Yes. `DirectoryPartitioning` and `FilenamePartitioning` both now URI encode path segments by default. This can be disabled if desired to revert to the previous behaviour by setting the the `segment_encoding` parameter to "none". ### Was AI used for this PR? In accordance to the [AI generation guidelines](https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code), please disclose below whether and how AI was used in this PR. **PR code and description written by:** - [x] Human - Description and some code - [x] AI - Code, with close supervision **Reviewed before submission by:** - [x] Human - [x] AI - [ ] Not reviewed -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
