Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/14960#discussion_r77525653
--- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
@@ -1900,7 +1900,20 @@ private[spark] object Utils extends Logging {
*/
def resolveURI(path: String): URI = {
try {
- val uri = new URI(path)
+ val osSafePath = if (Path.isWindowsAbsolutePath(path, false)) {
+ // Make sure C:/ part becomes /C/.
+ val windowsUri = new URI(path)
+ val driveLetter = windowsUri.getScheme
+ s"/$driveLetter/${windowsUri.getSchemeSpecificPart()}"
+ } else if (Path.isWindowsAbsolutePath(path, true)) {
+ // Make sure /C:/ part becomes /C/.
+ val windowsUri = new URI(path.substring(1))
+ val driveLetter = windowsUri.getScheme
+ s"/$driveLetter/${windowsUri.getSchemeSpecificPart()}"
--- End diff --
Hm.. yeap, Firstly, I didn't add this logic and run the test with this diff
(https://github.com/HyukjinKwon/spark/compare/master...HyukjinKwon:a136206dad6011d6ad112f33417790ad3c6a9912)
produced the output here
https://gist.github.com/HyukjinKwon/f3f9a36dde88028ca09fd417b6ce5c68
So, I corrected this (without knowing we are testing that case). with the
diff here
(https://github.com/HyukjinKwon/spark/compare/master...HyukjinKwon:b648e4f2d5aae072748a97550cfcf832c57d9315)
produced the output here,
https://gist.github.com/HyukjinKwon/0c42b2c208e06c59525d91087252d9b0
This seems it reduces roughly 10ish test failures. So I thought this is a
legitimate change.
I will double-check.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]