Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-7666

"Failed to parse query exception" has no description to find error in query

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.3
    • None
    • sql
    • None

    Description

      In the query below there are wrong quote characters around alias name(it requires no quotes or double quotes), but the exception has no clue to find the error in query. This query is simple and it wouldn't take a lot of time to find the error to users, but it becomes almost impossible to find the error in real life big and complex queries: 

      0: jdbc:ignite:thin://127.0.0.1/> 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 org.apache.ignite.internal.jdbc.thin.JdbcThinConnection.sendRequest(JdbcThinConnection.java:671)
       at org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute0(JdbcThinStatement.java:130)
       at org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute(JdbcThinStatement.java:299)
       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)

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            mcherkasov Mikhail Cherkasov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: