You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vladimir Steshin (Jira)" <ji...@apache.org> on 2024/10/02 13:44:00 UTC
[jira] [Updated] (IGNITE-23341) Calcite. Incorrect casts of numeric literals.
[ https://issues.apache.org/jira/browse/IGNITE-23341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vladimir Steshin updated IGNITE-23341:
--------------------------------------
Affects Version/s: 2.14
> 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)