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

xiong duan updated CALCITE-6981:
--------------------------------
    Summary: Runtime conversion of DECIMAL ARRAY to INT ARRAY fails with a 
ClassCastException  (was: The query failed when attempting to convert DECIMAL  
ARRAY to INTEGER ARRAY)

> 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
>             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