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

Calcite bug. CREATE TABLE with WHERE SELECT 1;

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Cannot Reproduce
    • None
    • None
    • sql

    Description

      CREATE TABLE TABLE_E061_09_01_04 ( A INT PRIMARY KEY, CC INTEGER ); SELECT A FROM TABLE_E061_09_01_04 WHERE A = ( SELECT 1 );

      fires:

      java.lang.AssertionError: RelSubset [rel#4121:RelSubset#7.IGNITE.[].single.rewindable.uncorrelated] has wrong best cost 1021.1399999999999. Correct cost is 1057.0
      	at org.apache.calcite.util.Litmus$1.fail(Litmus.java:31)
      	at org.apache.calcite.plan.volcano.VolcanoPlanner.isValid(VolcanoPlanner.java:647)
      	at org.apache.calcite.plan.volcano.VolcanoPlanner.ensureRegistered(VolcanoPlanner.java:610)
      	at org.apache.calcite.plan.volcano.VolcanoRuleCall.transformTo(VolcanoRuleCall.java:148)
      	at org.apache.calcite.plan.RelOptRuleCall.transformTo(RelOptRuleCall.java:268)
      	at org.apache.calcite.plan.RelOptRuleCall.transformTo(RelOptRuleCall.java:283)
      	at org.apache.calcite.rel.convert.ConverterRule.onMatch(ConverterRule.java:169)
      	at org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:229)
      	at org.apache.calcite.plan.volcano.TopDownRuleDriver.applyGenerator(TopDownRuleDriver.java:142)
      	at org.apache.calcite.plan.volcano.TopDownRuleDriver.access$600(TopDownRuleDriver.java:47)
      	at org.apache.calcite.plan.volcano.TopDownRuleDriver$ApplyRule.perform(TopDownRuleDriver.java:519)
      	at org.apache.calcite.plan.volcano.TopDownRuleDriver.drive(TopDownRuleDriver.java:101)
      	at org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:510)
      	at org.apache.calcite.tools.Programs$RuleSetProgram.run(Programs.java:312)
      	at org.apache.ignite.internal.processors.query.calcite.prepare.IgnitePlanner.transform(IgnitePlanner.java:258)
      	at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.optimize(ExecutionServiceImpl.java:616)
      	at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareQuery(ExecutionServiceImpl.java:568)
      	at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareSingle(ExecutionServiceImpl.java:542)
      	at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareQuery(ExecutionServiceImpl.java:501)
      	at org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCacheImpl.queryPlan(QueryPlanCacheImpl.java:84)
      	at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.executeQuery(ExecutionServiceImpl.java:378)
      	at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.query(CalciteQueryProcessor.java:240)
      	at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2787)
      	at org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2743)
      

      Attachments

        Issue Links

          Activity

            People

              ivandasch Ivan Daschinsky
              zstan Evgeny Stanilovsky
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: