You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/03/03 14:03:29 UTC
[GitHub] [spark] sarutak commented on pull request #31718: [SPARK-34225][CORE] Don't encode further when a URI form string is passed to addFile or addJar
sarutak commented on pull request #31718:
URL: https://github.com/apache/spark/pull/31718#issuecomment-789736141
> Hm, are we sure? I'd expect that a user does not pass an encoded string. If it contains a % for example then it's really a % that needs encoding (or else, the input is incorrect).
If a URI form string contains an encoded character, it should be really an encoded character, while a non-URI form string contains an encoded character, it should be leave it.
This solution can keep `%` as it is.
`--files`
```
$ bin/spark-shell --files /path/to/test%file.txt
scala> sc.listFiles
res0: Seq[String] = Vector(file:///tmp/test%25file.txt)
```
`sc.addFile`
```
scala> sc.addFile("/path/to/test%file.txt")
scala> sc.listFiles
res0: Seq[String] = Vector(file:///tmp/test%25file.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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org