[ https://issues.apache.org/jira/browse/CALCITE-4680?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Rebele updated CALCITE-4680: ----------------------------------- Attachment: Calcite4680.java > AssertionError: contains $cor1, while converting SQL query containing UNNEST > to logical plan using subquery expansion > --------------------------------------------------------------------------------------------------------------------- > > Key: CALCITE-4680 > URL: https://issues.apache.org/jira/browse/CALCITE-4680 > Project: Calcite > Issue Type: Bug > Affects Versions: 1.27.0 > Reporter: Thomas Rebele > Priority: Minor > Labels: pull-request-available > Attachments: Calcite4680.java, Calcite4680.java > > Time Spent: 10m > Remaining Estimate: 0h > > The exception happens with the following SQL query > {code:java} > SELECT field1 FROM tab t1 > WHERE t1.field1 NOT IN ( > SELECT l.subfield > FROM tab t2, UNNEST(t2.field2) AS l > WHERE t1.field1 = t2.field1) > {code} > and the schema > {code:java} > RecordType(VARCHAR NOT NULL field1, RecordType(VARCHAR subfield) ARRAY field2) > {code} > (where field2.subfield is nullable). Previous versions of Calcite threw a > ClassCastException: LogicalCorrelate cannot be cast to Join. > However, it passes after removing the WHERE clause of the subquery. -- This message was sent by Atlassian Jira (v8.3.4#803005)