-
Type:
Sub-task
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 3.1.0
-
Fix Version/s: None
-
Component/s: SQL
-
Labels:None
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
DESCRIBE INSERT INTO desc_temp1 values (1, 'val1');
is
mismatched input 'desc_temp1' expecting {<EOF>, '.'}(line 1, pos 21)}}
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
mismatched insert clause 'INSERT INTO desc_temp1 values (1, 'val1');' expecting normal query clauses.