You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Sean Broeder (Jira)" <ji...@apache.org> on 2026/09/30 02:45:00 UTC

[jira] [Updated] (CALCITE-7831) CompileException from CAST(ARRAY[ROW(1)] AS ROW(a INTEGER) ARRAY)

     [ https://issues.apache.org/jira/browse/CALCITE-7831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Broeder updated CALCITE-7831:
----------------------------------
    Summary: CompileException from CAST(ARRAY[ROW(1)] AS ROW(a INTEGER) ARRAY)  (was: CompileException casting a ROW array literal to Object[])

> CompileException from CAST(ARRAY[ROW(1)] AS ROW(a INTEGER) ARRAY)
> -----------------------------------------------------------------
>
>                 Key: CALCITE-7831
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7831
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Sean Broeder
>            Priority: Major
>
> CAST(ARRAY[ROW(1)] AS ROW(a INTEGER) ARRAY) fails at runtime on main  
>     select * from unnest(cast(array[row(1)] as row(a integer) array))
>   throws:
>     org.apache.calcite.runtime.CalciteContextException: ...
>     Caused by: org.codehaus.commons.compiler.CompileException:
>     Cannot cast "Baz$Record1_0" to "java.lang.Object[]"
>     
> The validator and SqlToRelConverter both handle this literal correctly
> in CALCITE-7791, but code generation for the runtime CAST from the
> literal's generated record class to Object[] is broken, so no end to end
> test can use this literal.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)