Mikhail Cherkasov created IGNITE-7666:

             Summary: "Failed to parse query exception" has no description to 
find error in query
                 Key: IGNITE-7666
                 URL: https://issues.apache.org/jira/browse/IGNITE-7666
             Project: Ignite
          Issue Type: Bug
          Components: sql
    Affects Versions: 2.3
            Reporter: Mikhail Cherkasov
             Fix For: 2.5

As an example, in the query below there are wrong quote characters around alias 
name(it requires no quotes or double quotes), but exception has no clue to find 
the error in query. This query is simple and the error easy to find, but it 
becomes almost impossible to find the error in real life queries: 
0: jdbc:ignite:thin://> SELECT Name as 'super_name' from person p 
where p.name = 'test';
Error: Failed to parse query: SELECT Name as 'super_name' from person p where 
p.name = 'test' (state=42000,code=0)
java.sql.SQLException: Failed to parse query: SELECT Name as 'super_name' from 
person p where p.name = 'test'
 at sqlline.Commands.execute(Commands.java:823)
 at sqlline.Commands.sql(Commands.java:733)
 at sqlline.SqlLine.dispatch(SqlLine.java:795)
 at sqlline.SqlLine.begin(SqlLine.java:668)
 at sqlline.SqlLine.start(SqlLine.java:373)
 at sqlline.SqlLine.main(SqlLine.java:265){noformat}

This message was sent by Atlassian JIRA

Reply via email to