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

Unnest on array with nested structs causes ArrayStoreException

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 1.23.0
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: