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

    https://github.com/apache/spark/pull/10208#discussion_r47143928
  
    --- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
    @@ -331,6 +331,30 @@ private[spark] object Utils extends Logging {
       }
     
       /**
    +   * A file name may contain some invalid url characters, such as " ". 
This method will convert the
    +   * file name to a raw path accepted by `java.net.URI(String)`.
    +   *
    +   * Note: the file name must not contain "/" or "\"
    +   */
    +  def encodeFileNameToURIRawPath(fileName: String): String = {
    --- End diff --
    
    I don't think that file name is a problem in a URL though. `:` is not 
reserved in that part. You'd have to send this to `java.net.URI` "manually" 
like you've done, or else use `file:/abc:xyz`. Then it's doing the same thing; 
your method wouldn't escape the colon either.


---
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]

Reply via email to