Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-25086

Incorrect Default Value For "escape" For CSV Files

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 2.3.1
    • None
    • SQL
    • None

    Description

      The RFC for CSV files (https://tools.ietf.org/html/rfc4180) indicates that the way that a double-quote is escaped is by preceding it with another double-quote:

      7. If double-quotes are used to enclose fields, then a double-quote appearing inside a field must be escaped by preceding it with another double quote. For example: "aaa","b""bb","ccc"

      Your default value for "escape" violates the RFC. I think that we should fix the default value to be ", and those that want {{}} to escape can override for non-RFC-conforming CSV files.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              davidlukewilcox David Wilcox
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: