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

Yesheng Ma updated SPARK-27906:
-------------------------------
    Description: 
The {{CREATE LOCAL TEMPORARY TABLE}} statement is actually not supported in 
Spark SQL. However, when a user queries such a statement, the error message is 
confusing. For example, the error message for


{code:sql}
CREATE LOCAL TEMPORARY TABLE my_table (x INT);
{code}

is
{code:java}
no viable alternative at input 'CREATE LOCAL'(line 1, pos 7)
{code}
which is misleading.
 

One possible way to fix is to explicitly capture these statements in a grammar 
rule and print user-friendly error message such as
{code:java}
CREATE LOCAL TEMPORARY TABLE statements are not supported.
{code}

  was:
{{SHOW VIEW}} statement is actually not supported in Spark SQL. However, when a 
user quries such a statement, the error message is confusing. For example, the 
error message for


{code:sql}
SHOW VIEWS IN my_database
{code}

is
{code:java}
missing 'FUNCTIONS' at 'IN'(line 1, pos 11)
{code}
which is misleading.
 

One possible way to fix is to explicitly capture these statements in a grammar 
rule and print user-friendly error message such as
{code:java}
SHOW VIEW statements are not supported.
{code}


> Improve parser error message for CREATE LOCAL TEMPORARY TABLE statement
> -----------------------------------------------------------------------
>
>                 Key: SPARK-27906
>                 URL: https://issues.apache.org/jira/browse/SPARK-27906
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Yesheng Ma
>            Priority: Major
>
> The {{CREATE LOCAL TEMPORARY TABLE}} statement is actually not supported in 
> Spark SQL. However, when a user queries such a statement, the error message 
> is confusing. For example, the error message for
> {code:sql}
> CREATE LOCAL TEMPORARY TABLE my_table (x INT);
> {code}
> is
> {code:java}
> no viable alternative at input 'CREATE LOCAL'(line 1, pos 7)
> {code}
> which is misleading.
>  
> One possible way to fix is to explicitly capture these statements in a 
> grammar rule and print user-friendly error message such as
> {code:java}
> CREATE LOCAL TEMPORARY TABLE statements are not supported.
> {code}



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

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

Reply via email to