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

[jira] [Created] (SPARK-27902) Improve error message for DESCRIBE statement

Yesheng Ma created SPARK-27902:
----------------------------------

             Summary: Improve error message for DESCRIBE statement
                 Key: SPARK-27902
                 URL: https://issues.apache.org/jira/browse/SPARK-27902
             Project: Spark
          Issue Type: Sub-task
          Components: SQL
    Affects Versions: 3.0.0
            Reporter: Yesheng Ma


{{DESCRIBE}} statement only supports queries such as {{SELECT}}. However, when other statements are used as a clause of {{DESCRIBE}}, the error message is confusing.

For example, the error message for 
{code:sql}
DESCRIBE INSERT INTO desc_temp1 values (1, 'val1');
{code}
is
{code:java}
mismatched input 'desc_temp1' expecting {<EOF>, '.'}(line 1, pos 21)}}
{code}
which is misleading and hard for end users to figure out the real cause.


One possible way to fix is to explicitly capture such kind of wrong clauses and print user-friendly error message such as
{code:java}
mismatched insert clause 'INSERT INTO desc_temp1 values (1, 'val1');'
expecting normal query clauses.
{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