spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jiaan.geng (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-28073) ANSI SQL: Character literals
Date Mon, 15 Jul 2019 08:10:00 GMT

    [ 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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message