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

    https://github.com/apache/spark/pull/18581#discussion_r134817030
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVSuite.scala
 ---
    @@ -1195,4 +1196,46 @@ class CSVSuite extends QueryTest with 
SharedSQLContext with SQLTestUtils {
           .csv(Seq("10u12").toDS())
         checkAnswer(results, Row(null))
       }
    +
    +  test("SPARK-21289: Support line separator") {
    +    Seq(false, true).foreach { multiLine =>
    +      // Read
    +      Seq("a,b|1,\"a\nd\"|1,f|", "a,b|1,\"a\nd\"|1,f").foreach { lines =>
    +        withTempPath { path =>
    +          Files.write(path.toPath, lines.getBytes(StandardCharsets.UTF_8))
    +          val df = spark.read
    +            .option("multiLine", multiLine)
    +            .option("lineSep", "|")
    --- End diff --
    
    The test case should be a function. We can pass different separators and 
verify whether it returns the expected results.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to