[
https://issues.apache.org/jira/browse/IGNITE-28371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18069529#comment-18069529
]
Pavel Pereslegin edited comment on IGNITE-28371 at 3/30/26 8:53 AM:
--------------------------------------------------------------------
+/-Infinity raises "out of range" (see IgniteMath.convertToIntExact)
+/-0 returns 0
It seems that only the conversion to 'NaN' is incorrect.
But need to cover with test all such cases (for example
'+Infinity'::DOUBLE:BIGINT/INT/TINYINT and so on)
was (Author: xtern):
+/-Infinity produces "out of range" (see IgniteMath.convertToIntExact)
> Sql. Cast special floating-point values to integer must produce out of range
> error
> ----------------------------------------------------------------------------------
>
> Key: IGNITE-28371
> URL: https://issues.apache.org/jira/browse/IGNITE-28371
> Project: Ignite
> Issue Type: Improvement
> Components: sql ai3
> Reporter: Pavel Pereslegin
> Priority: Major
> Labels: ignite-3
>
> Example:
> {code:sql}
> 'NaN'::FLOAT::INT
> {code}
> Currently returns 0, but according to SQL spec must raise "data exception —
> numeric value out of range." (6.13 cast specification -> general rule 8).
>
> Also let's check +-/Inf
--
This message was sent by Atlassian Jira
(v8.20.10#820010)