[
https://issues.apache.org/jira/browse/IGNITE-23590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18103634#comment-18103634
]
Evgeny Stanilovsky commented on IGNITE-23590:
---------------------------------------------
Need to adopt : IGNITE-19877 Sql. Fix not allowed CAST operations
> Calcite. Introduce and fix types cast rules.
> --------------------------------------------
>
> Key: IGNITE-23590
> URL: https://issues.apache.org/jira/browse/IGNITE-23590
> Project: Ignite
> Issue Type: Improvement
> Affects Versions: 2.14
> Reporter: Vladimir Steshin
> Priority: Minor
> Labels: calcite, ignite-2, ise
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Calcite type cast rules differ from the standard. It should respect it.
> Consider:
> {code:java}
> // Works, but should not allow the cast at all.
> assertQuery("SELECT CAST(timestamp '1992-09-26 02:30:00' AS
> BIGINT)").returns(717474600000L).check();
> // Fails with `TINYINT overflow`, but should not allow the cast at all.
> assertQuery("SELECT CAST(timestamp '1992-09-26 02:30:00' AS
> TINYINT)").returns(1).check();
> {code}
> Adoption of #IGNITE-20069
--
This message was sent by Atlassian Jira
(v8.20.10#820010)