Echo Lee created CALCITE-5973:
---------------------------------

             Summary: Parsing DDL error message is inaccurate
                 Key: CALCITE-5973
                 URL: https://issues.apache.org/jira/browse/CALCITE-5973
             Project: Calcite
          Issue Type: Wish
          Components: core
    Affects Versions: 1.32.0
            Reporter: Echo Lee
             Fix For: 1.36.0


When i parse the following DDL statement:

 
{code:java}
// code placeholder
reate table t (
    a int, 
    b varchar) 
with('key' = 'value') {code}
 

where the create keyword lacks the initial letter c

The parse method is:
{code:java}
// code placeholder
SqlParser parser = SqlParser.create(sql, config);
return parser.parseStmt(); {code}
The exception I get is:
{code:java}
// code placeholder
Caused by: org.apache.calcite.runtime.CalciteException: Non-query expression 
encountered in illegal context
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at 
org.apache.calcite.runtime.Resources$ExInstWithCause.ex(Resources.java:505) 
{code}
I feel that this exception information is not very accurate.

 

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to