Ruben Q L created CALCITE-4064:
----------------------------------
Summary: Unnest on array with nested structs causes
ArrayStoreException
Key: CALCITE-4064
URL: https://issues.apache.org/jira/browse/CALCITE-4064
Project: Calcite
Issue Type: Bug
Components: core
Affects Versions: 1.23.0
Reporter: Ruben Q L
Maybe related to CALCITE-4063.
The problem can be reproduced by running the following query:
{code:sql}
select * from UNNEST(array[ROW(1, ROW(5, 10)), ROW(2, ROW(6, 12))])
{code}
Which fails with:
{code}
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)
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)