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

Calcite. Numerous errors with any\all scalars.

    XMLWordPrintableJSON

Details

    Description

      {{ /subquery/any_all/test_scalar_any_all.test[_ignore] }}

      SELECT 1 = ALL(SELECT 1)
      
      Unexpected error at query optimizer.
      java.lang.AssertionError
      	at org.apache.calcite.rel.rules.SubQueryRemoveRule.rewriteSome(SubQueryRemoveRule.java:162)
      	at org.apache.calcite.rel.rules.SubQueryRemoveRule.apply(SubQueryRemoveRule.java:92)
      	at org.apache.calcite.rel.rules.SubQueryRemoveRule.matchProject(SubQueryRemoveRule.java:603)
      	at org.apache.calcite.rel.rules.SubQueryRemoveRule.access$200(SubQueryRemoveRule.java:71)
      	at org.apache.calcite.rel.rules.SubQueryRemoveRule$Config.lambda$static$1(SubQueryRemoveRule.java:685)
      	at org.apache.calcite.rel.rules.SubQueryRemoveRule.onMatch(SubQueryRemoveRule.java:82)
      	at org.apache.calcite.plan.AbstractRelOptPlanner.fireRule(AbstractRelOptPlanner.java:341)
      
      SELECT 1 = ALL(SELECT NULL)
      
      Unexpected error at query optimizer.
      java.lang.AssertionError
      	at org.apache.calcite.rel.rules.SubQueryRemoveRule.rewriteSome(SubQueryRemoveRule.java:162)
      	at org.apache.calcite.rel.rules.SubQueryRemoveRule.apply(SubQueryRemoveRule.java:92)
      	at org.apache.calcite.rel.rules.SubQueryRemoveRule.matchProject(SubQueryRemoveRule.java:603)
      
      SELECT 1 IN (SELECT NULL)
      
      Unexpected error at query optimizer.
      java.lang.AssertionError: Conversion to relational algebra failed to preserve datatypes:
      validated type:
      RecordType(BOOLEAN NOT NULL EXPR$0) NOT NULL
      converted type:
      RecordType(BOOLEAN EXPR$0) NOT NULL
      rel:
      LogicalProject(EXPR$0=[IN(1, {
      LogicalValues(tuples=[[{ null }]])
      })])
        LogicalValues(tuples=[[{ 0 }]])
      
      	at org.apache.calcite.sql2rel.SqlToRelConverter.checkConvertedType(SqlToRelConverter.java:485)
      	at org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:600)
      	at org.apache.ignite.internal.processors.query.calcite.prepare.IgnitePlanner.rel(IgnitePlanner.java:214)
      

      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: