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

    https://github.com/apache/spark/pull/22654#discussion_r223754099
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVSuite.scala
 ---
    @@ -1826,4 +1826,13 @@ class CSVSuite extends QueryTest with 
SharedSQLContext with SQLTestUtils with Te
         val df = spark.read.option("enforceSchema", false).csv(input)
         checkAnswer(df, Row("1", "2"))
       }
    +
    +  test("using the backward slash as the delimiter") {
    +    val input = Seq("""abc\1""").toDS()
    --- End diff --
    
    > Or is the point that delimiting takes precedence?
    
    Right, if an user specified `\` as a delimiter, CSV parser considers it as 
the delimiter first of all. We can see that in the main loop that delimiters 
are handled before escape characters:
    
https://github.com/uniVocity/univocity-parsers/blob/6746adc2ddb420ebba7441339887e4bbc35cf087/src/main/java/com/univocity/parsers/csv/CsvParser.java#L115


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to