You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Xiao Li (JIRA)" <ji...@apache.org> on 2019/05/24 22:21:00 UTC

[jira] [Resolved] (SPARK-27809) Make optional clauses order insensitive for CREATE DATABASE/VIEW SQL statement

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

Xiao Li resolved SPARK-27809.
-----------------------------
          Resolution: Fixed
       Fix Version/s:     (was: 2.4.3)
                      3.0.0
    Target Version/s:   (was: 2.4.3)

> Make optional clauses order insensitive for CREATE DATABASE/VIEW SQL statement
> ------------------------------------------------------------------------------
>
>                 Key: SPARK-27809
>                 URL: https://issues.apache.org/jira/browse/SPARK-27809
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.4.3
>            Reporter: Yesheng Ma
>            Priority: Major
>             Fix For: 3.0.0
>
>
> Each time, when I write a complex CREATE DATABASE/VIEW statements, I have to open the .g4 file to find the EXACT order of clauses in CREATE TABLE statement. When the order is not right, I will get A strange confusing error message generated from ANTLR4.
> The original g4 grammar for CREATE VIEW is
> {code:sql}
> CREATE [OR REPLACE] [[GLOBAL] TEMPORARY] VIEW [db_name.]view_name
>   [(col_name1 [COMMENT col_comment1], ...)]
>   [COMMENT table_comment]
>   [TBLPROPERTIES (key1=val1, key2=val2, ...)]
> AS select_statement
> {code}
> The proposal is to make the following clauses order insensitive.
> {code:sql}
>   [COMMENT table_comment]
>   [TBLPROPERTIES (key1=val1, key2=val2, ...)]
> {code}
> –
>  The original g4 grammar for CREATE DATABASE is
> {code:sql}
> CREATE (DATABASE|SCHEMA) [IF NOT EXISTS] db_name
>   [COMMENT comment_text]
>   [LOCATION path]
>   [WITH DBPROPERTIES (key1=val1, key2=val2, ...)]
> {code}
> The proposal is to make the following clauses order insensitive.
> {code:sql}
>   [COMMENT comment_text]
>   [LOCATION path]
>   [WITH DBPROPERTIES (key1=val1, key2=val2, ...)]
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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