Sean Broeder created CALCITE-7831:
-------------------------------------

             Summary: CompileException casting a ROW array literal to Object[]
                 Key: CALCITE-7831
                 URL: https://issues.apache.org/jira/browse/CALCITE-7831
             Project: Calcite
          Issue Type: Bug
          Components: core
            Reporter: Sean Broeder


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)

Reply via email to