[
https://issues.apache.org/jira/browse/IGNITE-22471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17984945#comment-17984945
]
Pavel Pereslegin commented on IGNITE-22471:
-------------------------------------------
This appears to have been fixed in Calcite 1.39, and the relevant tests can now
be safely unmuted.
> Sql. Intervals. Similar CAST expressions produce completely different results
> -----------------------------------------------------------------------------
>
> Key: IGNITE-22471
> URL: https://issues.apache.org/jira/browse/IGNITE-22471
> Project: Ignite
> Issue Type: Bug
> Components: sql
> Affects Versions: 3.0
> Reporter: Maksim Zhuravkov
> Assignee: Pavel Pereslegin
> Priority: Major
> Labels: ignite-3
> Fix For: 3.1
>
>
> Both cast expression in the following example produce wildly different
> results:
> {code:java}
> assertEquals(Duration.ofDays(1), eval("CAST(1 AS INTERVAL DAYS)"));
> // Fails
> assertEquals(Duration.ofDays(1), eval("CAST(1::TINYINT AS INTERVAL DAYS)"));
> <<< PT0.001S
> {code}
> Replacing TINYINT with INT, SMALLINT, BIGINT, DECIMAL produces the same error.
> *Expected behaviour*
> Both expressions should produce the same result.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)