Vladimir Steshin created IGNITE-23590:
-----------------------------------------

             Summary: Calcite. Fix types cast rules.
                 Key: IGNITE-23590
                 URL: https://issues.apache.org/jira/browse/IGNITE-23590
             Project: Ignite
          Issue Type: Improvement
            Reporter: Vladimir Steshin


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}




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to