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

AssertionError in SQL on subquery with offset and limit

    XMLWordPrintableJSON

Details

    Description

      Query

      select _T0.KEY from (select _T1.KEY, _T1.VAL from PUBLIC.TBL1 as _T1 order by (_T1.KEY) desc limit ? offset ?) as _T0
      

      Error

      java.lang.AssertionError: rowType: RecordType(BIGINT KEY, VARCHAR(65536) VAL), mapping: [size=1, sourceCount=2, targetCount=1, elements=[0:0]]
      	at org.apache.calcite.sql2rel.RelFieldTrimmer$TrimResult.<init>(RelFieldTrimmer.java:1342)
      	at org.apache.calcite.sql2rel.RelFieldTrimmer.result(RelFieldTrimmer.java:337)
      	at org.apache.calcite.sql2rel.RelFieldTrimmer.trimFields(RelFieldTrimmer.java:672)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at org.apache.calcite.util.ReflectUtil$2.invoke(ReflectUtil.java:531)
      	at org.apache.calcite.sql2rel.RelFieldTrimmer.dispatchTrimFields(RelFieldTrimmer.java:284)
      	at org.apache.calcite.sql2rel.RelFieldTrimmer.trimChild(RelFieldTrimmer.java:226)
      	at org.apache.calcite.sql2rel.RelFieldTrimmer.trimFields(RelFieldTrimmer.java:498)
      	at jdk.internal.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at org.apache.calcite.util.ReflectUtil$2.invoke(ReflectUtil.java:531)
      	at org.apache.calcite.sql2rel.RelFieldTrimmer.dispatchTrimFields(RelFieldTrimmer.java:284)
      	at org.apache.calcite.sql2rel.RelFieldTrimmer.trim(RelFieldTrimmer.java:171)
      	at org.apache.calcite.sql2rel.SqlToRelConverter.trimUnusedFields(SqlToRelConverter.java:549)
      	at org.apache.ignite.internal.sql.engine.prepare.IgnitePlanner.trimUnusedFields(IgnitePlanner.java:351)
      	at org.apache.ignite.internal.sql.engine.prepare.PlannerHelper.optimize(PlannerHelper.java:76)
      	at org.apache.ignite.internal.sql.engine.prepare.PrepareServiceImpl.lambda$prepareQuery$1(PrepareServiceImpl.java:231)
      

      Attachments

        Issue Links

          Activity

            People

              jooger Iurii Gerzhedovich
              ptupitsyn Pavel Tupitsyn
              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 - 10m
                  10m