[
https://issues.apache.org/jira/browse/IGNITE-23192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17886724#comment-17886724
]
Evgeny Stanilovsky commented on IGNITE-23192:
---------------------------------------------
Seems this is correct behavior, cast for correct type need to be called for
overflow prevention.
> Sql. Arithmetic operations failed with "out of range" exception.
> ----------------------------------------------------------------
>
> Key: IGNITE-23192
> URL: https://issues.apache.org/jira/browse/IGNITE-23192
> Project: Ignite
> Issue Type: Bug
> Components: sql
> Affects Versions: 3.0.0-beta1
> Reporter: Evgeny Stanilovsky
> Assignee: Evgeny Stanilovsky
> Priority: Major
> Labels: ignite-3
> Fix For: 3.0
>
> Time Spent: 4.5h
> Remaining Estimate: 0h
>
> {noformat}
> sql("CREATE TABLE t(key int primary key, c1 tinyint, c2 tinyint)");
> sql("INSERT INTO t VALUES(1, 100, 100)");
> sql("SELECT c1 + c2 from t");
> // the same:
> sql("SELECT c1 * c2 from t");
> // will fail but need different insertion: INSERT INTO t VALUES(1, -100, 100)
> sql("SELECT c1 - c2 from t");
> {noformat}
> Failed with :
> "TINYINT out of range" exception, seems the same for int16 and int 32 types
--
This message was sent by Atlassian Jira
(v8.20.10#820010)