[
https://issues.apache.org/jira/browse/IGNITE-23341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Evgeny Stanilovsky resolved IGNITE-23341.
-----------------------------------------
Release Note: now this behavior is aligned with Oracle and ignite-3, thus i
close it (was: Fixed incorrect casts of numeric literals.)
Resolution: Not A Problem
> Calcite. Incorrect casts of numeric literals.
> ---------------------------------------------
>
> Key: IGNITE-23341
> URL: https://issues.apache.org/jira/browse/IGNITE-23341
> Project: Ignite
> Issue Type: Bug
> Affects Versions: 2.14
> Reporter: Vladimir Steshin
> Priority: Minor
> Labels: calcite, ignite-2, ise
>
> Incorrect numeric literals are processed without errors.
> Reproducer:
> {code:java}
> /** */
> @Test
> public void testCastNumLiterals(){
> // Cast or validation error expected. Returns: 100L.
> assertThrows("SELECT CAST('100.1' AS BIGINT)", Exception.class,
> "cannot cast");
> // An overflow error expected. Returns: Infinity.
> assertThrows("SELECT CAST(1e39 AS REAL)", Exception.class,
> "Overflow");
> // An overflow error expected. Returns: Infinity.
> assertThrows("SELECT CAST(1e39 AS FLOAT)", Exception.class,
> "Overflow");
> }
> {code}
> Adoption of #IGNITE-22519
--
This message was sent by Atlassian Jira
(v8.20.10#820010)