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

Yu Xu resolved CALCITE-5973.
----------------------------
    Fix Version/s: 1.43.0
       Resolution: Fixed

Fixed in 
[https://github.com/apache/calcite/commit/d095b8cad68ceebe4d95f5c828e6389ee5cf9a36]

Thank you reported this Jira [~Echo Lee] 

Thank you for the review [~mbudiu] 

> 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
>            Assignee: Yu Xu
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.43.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 inaccurate.
>  
>  



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

Reply via email to