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

    https://github.com/apache/spark/pull/20355#discussion_r163414704
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/FileBasedDataSourceSuite.scala ---
    @@ -68,13 +68,16 @@ class FileBasedDataSourceSuite extends QueryTest with 
SharedSQLContext {
       }
     
       allFileBasedDataSources.foreach { format =>
    -    test(s"SPARK-22146 read files containing special characters using 
$format") {
    -      val nameWithSpecialChars = s"sp&cial%chars"
    -      withTempDir { dir =>
    -        val tmpFile = s"$dir/$nameWithSpecialChars"
    -        spark.createDataset(Seq("a", 
"b")).write.format(format).save(tmpFile)
    -        val fileContent = spark.read.format(format).load(tmpFile)
    -        checkAnswer(fileContent, Seq(Row("a"), Row("b")))
    +    test(s"SPARK-22146 / SPARK-23148 read files containing special 
characters using $format") {
    +      val nameWithSpecialChars = s"sp&cial%c hars"
    +      Seq(true, false).foreach { multiline =>
    --- End diff --
    
    Less dup is fine but this case slightly confuses like orc and parquet 
support multiline, and runs duplicated tests as you pointed out if I should 
nitpick. I think I prefer a separate test.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to