You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2021/07/31 16:37:00 UTC

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

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

Apache Spark reassigned SPARK-36371:
------------------------------------

    Assignee: Kousuke Saruta  (was: Apache Spark)

> 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
>
> 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