tustvold commented on code in PR #8012:
URL: https://github.com/apache/arrow-datafusion/pull/8012#discussion_r1377956619
##########
datafusion/core/src/datasource/listing/url.rs:
##########
@@ -317,8 +315,27 @@ mod tests {
let url = ListingTableUrl::parse("file:///foo/bar?").unwrap();
assert_eq!(url.prefix.as_ref(), "foo/bar");
- let url = ListingTableUrl::parse("file:///foo/😺").unwrap();
- assert_eq!(url.prefix.as_ref(), "foo/%F0%9F%98%BA");
+ let err = ListingTableUrl::parse("file:///foo/😺").unwrap_err();
+ assert_eq!(err.to_string(), "Object Store error: Encountered object
with invalid path: Error parsing Path \"/foo/😺\": Encountered illegal character
sequence \"😺\" whilst parsing path segment \"😺\"");
+
+ let url = ListingTableUrl::parse("file:///foo/bar%2Efoo").unwrap();
+ assert_eq!(url.prefix.as_ref(), "foo/bar.foo");
+
+ let url = ListingTableUrl::parse("file:///foo/bar%2Efoo").unwrap();
+ assert_eq!(url.prefix.as_ref(), "foo/bar.foo");
+
+ let url = ListingTableUrl::parse("file:///foo/bar%252Ffoo").unwrap();
+ assert_eq!(url.prefix.as_ref(), "foo/bar%2Ffoo");
+
+ let url = ListingTableUrl::parse("file:///foo/a%252Fb.txt").unwrap();
+ assert_eq!(url.prefix.as_ref(), "foo/a%2Fb.txt");
Review Comment:
On master this would return `foo/a%252Fb.txt`
--
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]