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

Support raw string literal

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.3.0
    • 3.3.0
    • SQL

    Description

      In the current master, sometimes it's too confusable to represent JSON and regex in a string literal if they contain backslash.
      For example, in JSON, \ needs to be escaped like as follows.

      {"a": "\\"}
      

      But, if the JSON above is represented in a string literal, further two \ are needed because string literal also requires \ to be escaped.

      SELECT from_json('{"a": "\\\\"}', 'a string')
      {"a":"\"}
      

      To make such case simpler, it's great if Spark supports raw string literal.

      Attachments

        Activity

          People

            sarutak Kousuke Saruta
            sarutak Kousuke Saruta
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: