[ 
https://issues.apache.org/jira/browse/CALCITE-6981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17949119#comment-17949119
 ] 

xiong duan commented on CALCITE-6981:
-------------------------------------

Fixed in 
[56fa308|https://github.com/apache/calcite/commit/56fa3089f19f12970fe5bf79b503ff842941097e].
 Thanks for the review [~mbudiu] .

> Runtime conversion of DECIMAL ARRAY to INT ARRAY fails with a 
> ClassCastException
> --------------------------------------------------------------------------------
>
>                 Key: CALCITE-6981
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6981
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: xiong duan
>            Assignee: xiong duan
>            Priority: Minor
>              Labels: pull-request-available
>             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)

Reply via email to