[
https://issues.apache.org/jira/browse/SPARK-28073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16884923#comment-16884923
]
jiaan.geng commented on SPARK-28073:
------------------------------------
I think Spark SQL have implemented this syntax.
I test this sql in spark:
{code:java}
spark-sql> SELECT 'first line' ' - next line' ' - third line' AS a;
first line - next line - third line
Time taken: 0.207 seconds, Fetched 1 row(s){code}
The g4 file exists the definition:
{code:java}
STRING
: '\'' ( ~('\''|'\\') | ('\\' .) )* '\''
| '"' ( ~('"'|'\\') | ('\\' .) )* '"'
;{code}
Although this identity named `STRING`, it contains the definition of character
literals.
> ANSI SQL: Character literals
> ----------------------------
>
> Key: SPARK-28073
> URL: https://issues.apache.org/jira/browse/SPARK-28073
> Project: Spark
> Issue Type: Sub-task
> Components: SQL
> Affects Versions: 3.0.0
> Reporter: Yuming Wang
> Priority: Major
>
> ||Feature ID||Feature Name||Feature Description||
> |E021-03|Character literals|— Subclause 5.3, “<literal>”: <quote> [
> <character representation>... ] <quote>|
> Example:
> {code:java}
> SELECT 'first line' ' - next line' ' - third line' AS "Three lines to
> one";{code}
> Postgresql:[https://www.postgresql.org/docs/9.1/features-sql-standard.html]
> Hive:[https://cwiki.apache.org/confluence/display/Hive/Supported+Features%3A+Apache+Hive+2.1]
>
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]