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

    https://github.com/apache/spark/pull/10208#discussion_r47144942
  
    --- 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 --
    
    We don't need to encode `colon`. The purpose here is: assume we have a uri 
prefix: `spark://localhost:1234/` and a file name: `abc xyz`, and want to 
concat the prefix and the file name to `spark://localhost:1234/abc%20xyz` so 
that we can pass it to `java.net.URI(String)`.


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