sarutak commented on a change in pull request #31718:
URL: https://github.com/apache/spark/pull/31718#discussion_r613005772
##########
File path: core/src/main/scala/org/apache/spark/SparkContext.scala
##########
@@ -1584,7 +1584,11 @@ class SparkContext(config: SparkConf) extends Logging {
path: String, recursive: Boolean, addedOnSubmit: Boolean, isArchive:
Boolean = false
): Unit = {
val uri = if (!isArchive) {
- new Path(path).toUri
+ if (Utils.isAbsoluteURI(path) && path.contains("%")) {
+ new URI(path)
+ } else {
+ new Path(path).toUri
+ }
} else {
Utils.resolveURI(path)
Review comment:
@HyukjinKwon BTW, Just replacing `Path` is my first idea of this PR.
https://github.com/apache/spark/pull/31718/commits/3c40f988de81600a75190751bf9987dfc93d09e9#diff-1e596e9e9bd50e3075847a66f8fecee741289b2b0478f9099c3bf2b680ebaa35R1586
But I changed to reflect [your
comment](https://github.com/apache/spark/pull/31718#issuecomment-792225217).
Anyway, I'll open a followup PR.
--
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]