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 2019/06/12 16:08:42 UTC
[GitHub] [spark] WeichenXu123 commented on a change in pull request #24855:
[SPARK-28030] convert filePath to URI in binary file data source
WeichenXu123 commented on a change in pull request #24855: [SPARK-28030] convert filePath to URI in binary file data source
URL: https://github.com/apache/spark/pull/24855#discussion_r292998681
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/binaryfile/BinaryFileFormatSuite.scala
##########
@@ -368,4 +368,14 @@ class BinaryFileFormatSuite extends QueryTest with SharedSQLContext with SQLTest
assert(caught.getMessage.contains("exceeds the max length allowed"))
}
}
+
+ test("SPARK-28030: support chars in file names that require URL encoding") {
+ withTempDir { dir =>
+ val file = new File(dir, "test space.txt")
+ val content = "123".getBytes
+ Files.write(file.toPath, content, StandardOpenOption.CREATE, StandardOpenOption.WRITE)
+ val df = spark.read.format(BINARY_FILE).load(dir.getPath)
+ df.collect()
Review comment:
Add a check that the collect result "path" equal to ".../test space.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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org