[
https://issues.apache.org/jira/browse/CALCITE-6981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17947084#comment-17947084
]
Mihai Budiu commented on CALCITE-6981:
--------------------------------------
Based on the error, this seems to happen at runtime.
I would add this information to the issue: runtime conversion of DECIMAL ARRAY
to INT ARRAY fails with a ClassCastException.
And I don't think this qualifies as priority "major".
> The query failed when attempting to convert DECIMAL ARRAY to INTEGER ARRAY
> ---------------------------------------------------------------------------
>
> Key: CALCITE-6981
> URL: https://issues.apache.org/jira/browse/CALCITE-6981
> Project: Calcite
> Issue Type: Bug
> Reporter: xiong duan
> Assignee: xiong duan
> Priority: Major
> Fix For: 1.40.0
>
>
> The test case in dummy.iq:
> {code:java}
> select cast(ARRAY[CAST(1.1111 as DECIMAL(2,1)),CAST(2.5465 as
> DECIMAL(2,1)),CAST(3.06754 as DECIMAL(2,1))] as integer ARRAY); {code}
> Throws exception:
> {code:java}
> java.lang.ClassCastException: class java.math.BigDecimal cannot be cast to
> class java.lang.Integer (java.math.BigDecimal and java.lang.Integer are in
> module java.base of loader 'bootstrap'){code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)