Maksim Zhuravkov created IGNITE-22471:
-----------------------------------------
Summary: 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
Reporter: Maksim Zhuravkov
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)