You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (Jira)" <ji...@apache.org> on 2021/08/19 03:39:00 UTC

[jira] [Resolved] (SPARK-36371) Support raw string literal

     [ https://issues.apache.org/jira/browse/SPARK-36371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wenchen Fan resolved SPARK-36371.
---------------------------------
    Fix Version/s: 3.3.0
       Resolution: Fixed

Issue resolved by pull request 33599
[https://github.com/apache/spark/pull/33599]

> Support raw string literal
> --------------------------
>
>                 Key: SPARK-36371
>                 URL: https://issues.apache.org/jira/browse/SPARK-36371
>             Project: Spark
>          Issue Type: New Feature
>          Components: SQL
>    Affects Versions: 3.3.0
>            Reporter: Kousuke Saruta
>            Assignee: Kousuke Saruta
>            Priority: Major
>             Fix For: 3.3.0
>
>
> 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.
> {code}
> {"a": "\\"}
> {code}
> But, if the JSON above is represented in a string literal, further two \ are needed because string literal also requires \ to be escaped.
> {code}
> SELECT from_json('{"a": "\\\\"}', 'a string')
> {"a":"\"}
> {code}
> To make such case simpler, it's great if Spark supports raw string literal.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org