You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "MaxGekk (via GitHub)" <gi...@apache.org> on 2023/09/28 14:09:11 UTC

[GitHub] [spark] MaxGekk commented on a diff in pull request #43152: [SPARK-45361][SQL][DOCS] Describe characters unescaping in string literals

MaxGekk commented on code in PR #43152:
URL: https://github.com/apache/spark/pull/43152#discussion_r1340216443


##########
docs/sql-ref-literals.md:
##########
@@ -51,6 +51,20 @@ A string literal is used to specify a character string value.
 
     Case insensitive, indicates `RAW`. If a string literal starts with `r` prefix, neither special characters nor unicode characters are escaped by `\`.
 
+The following escape sequences are recognized in regular string literals (without the `r` prefix), and replaced according to the following rules:
+- `\0` -> `\u0000`, unicode character with the code 0;
+- `\'` -> `'`, skip the slash before `'`;
+- `\"` -> `"`, skip the slash before `"`;

Review Comment:
   I think we can remove this cases because they duplicate the default case. In the PR, I removed them: https://github.com/apache/spark/pull/43170



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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