Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-4064

Unnest on array with nested structs causes ArrayStoreException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.23.0
    • None
    • core
    • None

    Description

      Maybe related to CALCITE-4063.

      The problem can be reproduced by running the following query:

      select * from UNNEST(array[ROW(1, ROW(5, 10)), ROW(2, ROW(6, 12))])
      

      Which fails with:

      java.lang.ArrayStoreException
      	at java.lang.System.arraycopy(Native Method)
      	at org.apache.calcite.runtime.SqlFunctions$ProductComparableListEnumerator.current(SqlFunctions.java:2837)
      	at org.apache.calcite.runtime.SqlFunctions$ProductComparableListEnumerator.current(SqlFunctions.java:2804)
      	at org.apache.calcite.linq4j.EnumerableDefaults$17$1.current(EnumerableDefaults.java:2619)
      	at org.apache.calcite.linq4j.Linq4j$EnumeratorIterator.next(Linq4j.java:684)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rubenql Ruben Q L
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: