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

Filipe Oliveira updated SPARK-27914:
------------------------------------
    Issue Type: Improvement  (was: Bug)

> Improve parser error message for ALTER TABLE ADD COLUMNS statement
> ------------------------------------------------------------------
>
>                 Key: SPARK-27914
>                 URL: https://issues.apache.org/jira/browse/SPARK-27914
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Yesheng Ma
>            Priority: Major
>
> The {{ALTER TABLE ADD COLUMNS}} statement is often misspelled as {{ALTER 
> TABLE ADD COLUMN}}. However, when a user queries such a statement, the error 
> message is confusing. For example, the error message for
> {code:sql}
> ALTER TABLE test ADD COLUMN (x INT);
> {code}
> is
> {code:java}
> no viable alternative at input 'ALTER TABLE test ADD COLUMN'(line 1, pos 21)
> {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 to instruct users to 
> change {{COLUMN}} to {{COLUMNS}}.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to