Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14960#discussion_r77510739
  
    --- 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 --
    
    BTW, this logic is taken after Hadoop codes. Please let me know if there 
are equivalent functions.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to