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

Pavel Pereslegin commented on IGNITE-19877:
-------------------------------------------

We also need to align the BOOLEAN cast according to the standard.
For example, currently we have

{code:java}
1::BOOLEAN -> false
1.0::BOOLEAN -> throws NoSuchMethodException: 
java.math.BigDecimal.booleanValue(){code}
It is suggested to forbid casting to boolean from other types (other than 
true/false literals) with a user-friendly exception of type casting.

> Sql. Erroneous cast possibility Custom object to Numeric.
> ---------------------------------------------------------
>
>                 Key: IGNITE-19877
>                 URL: https://issues.apache.org/jira/browse/IGNITE-19877
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 3.0.0-beta1
>            Reporter: Evgeny Stanilovsky
>            Priority: Major
>              Labels: ignite-3
>
> {code:java}
> @Test
> public void test0() \{
>     String query = format("SELECT CAST(? AS DECIMAL(5, 1))");
>     sql(query).withParams(LocalDateTime.now()).returns(2).ok();
> }
> {code}
> Throws Numeric overflow exception, seems this is incorrect behavior.



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

Reply via email to