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

Calcite. Statement with explain can`t be parsed.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • None
    • None
    • sql

    Description

      Code below throws exception:

              executeSql("CREATE TABLE test(i INTEGER)");
              executeSql("INSERT INTO test VALUES (1), (2)");
              assertQuery("explain plan for SELECT (SELECT i FROM test EXCEPT SELECT test.i) FROM test")
                  .returns(1)
                  .returns(2)
                  .check();
      
      class org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to parse query.
      	at org.apache.ignite.internal.processors.query.calcite.util.Commons.parse(Commons.java:207)
      	at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.query(CalciteQueryProcessor.java:341)
      	at org.apache.ignite.internal.processors.query.calcite.QueryChecker.check(QueryChecker.java:349)
      	at org.apache.ignite.internal.processors.query.calcite.integration.SetOpIntegrationTest.testSetOpRewindability(SetOpIntegrationTest.java:433)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      	at org.apache.ignite.testframework.junits.GridAbstractTest$7.run(GridAbstractTest.java:2432)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: org.apache.calcite.sql.parser.SqlParseException: Encountered "" at line 1, column 18.
      Was expecting one of:
          
      	at org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlParserImpl.convertException(IgniteSqlParserImpl.java:397)
      	at org.apache.ignite.internal.processors.query.calcite.sql.IgniteSqlParserImpl.normalizeException(IgniteSqlParserImpl.java:161)
      	at org.apache.calcite.sql.parser.SqlParser.handleException(SqlParser.java:145)
      	at org.apache.calcite.sql.parser.SqlParser.parseStmtList(SqlParser.java:200)
      	at org.apache.ignite.internal.processors.query.calcite.util.Commons.parse(Commons.java:222)
      	at org.apache.ignite.internal.processors.query.calcite.util.Commons.parse(Commons.java:204)
      	... 13 more
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              zstan Evgeny Stanilovsky
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: