[
https://issues.apache.org/jira/browse/SPARK-36371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17390993#comment-17390993
]
Apache Spark commented on SPARK-36371:
--------------------------------------
User 'sarutak' has created a pull request for this issue:
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
>
> 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: [email protected]
For additional commands, e-mail: [email protected]