[
https://issues.apache.org/jira/browse/IGNITE-16181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17690351#comment-17690351
]
Ilhom Ulmasov commented on IGNITE-16181:
----------------------------------------
[~alexpl] could, you please check the PR?
> Calcite engine. Handle arithmetic overflows
> -------------------------------------------
>
> Key: IGNITE-16181
> URL: https://issues.apache.org/jira/browse/IGNITE-16181
> Project: Ignite
> Issue Type: Improvement
> Reporter: Aleksey Plekhanov
> Assignee: Ilhom Ulmasov
> Priority: Major
> Labels: calcite2-required, calcite3-required, ise
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Currently, we silently ignore arithmetic overflows and return the wrong
> result, for example:
> {noformat}
> SELECT 2147483647 + 2147483647{noformat}
> Returns -2. But SQL standard says that exception should be thrown:
> {noformat}
> 5) If the most specific type of the result of an arithmetic operation is
> exact numeric, then Case:
> a) If the operator is not division and the mathematical result of the
> operation is not exactly representable with the precision and scale of the
> result data type, then an exception condition is raised: data exception —
> numeric value out of range.{noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)