-
Notifications
You must be signed in to change notification settings - Fork 413
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
fix(rust): special characters in s3 paths #2308
base: main
Are you sure you want to change the base?
Conversation
ACTION NEEDED delta-rs follows the Conventional Commits specification for release automation. The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification. |
@@ -46,7 +46,18 @@ impl LogStoreFactory for S3LogStoreFactory { | |||
location: &Url, | |||
options: &StorageOptions, | |||
) -> DeltaResult<Arc<dyn LogStore>> { | |||
let store = url_prefix_handler(store, Path::parse(location.path())?)?; | |||
let path_decoded = match urlencoding::decode(location.path()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line would benefit from a comment as to what this decoding does/why it exists
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
Co-authored-by: R. Tyler Croy <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would feel more confident with a test, but I'm willing to roll the dice here 😄 🎲
Is it correct to use URL encoding here? I believe Delta Lake uses URI encoded paths everywhere and not URL encoded paths. |
Description
Fixes #2266
We construct a "Prefix handler" for S3 paths. This prefix is passed into an s3 API that does not expect a URL-encoded path, so here we decode the path to support paths with characters such as spaces.
Related Issue(s)
2266