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

Calcite engine. Create table and use of this table in one statement doesn't work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None

    Description

       

      If a statement consists of substatements and a table is created in one of these substatement and then used by another, preparation of this statement failed. For example: 

      executeSql("CREATE TABLE test (val int); INSERT INTO test VALUES (0);");
      

      Failed with:

       

      Caused by: org.apache.calcite.tools.ValidationException: org.apache.calcite.runtime.CalciteContextException: From line 1, column 42 to line 1, column 45: Object 'TEST' not found
        at org.apache.ignite.internal.processors.query.calcite.prepare.IgnitePlanner.validate(IgnitePlanner.java:180)
        at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareDml(ExecutionServiceImpl.java:597)
        at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareSingle(ExecutionServiceImpl.java:561)
        at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareQuery(ExecutionServiceImpl.java:520)
      

      Attachments

        Issue Links

          Activity

            People

              ivandasch Ivan Daschinsky
              alex_pl Aleksey Plekhanov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 40m
                  1h 40m