Maksim Zhuravkov created IGNITE-22358:
-----------------------------------------
Summary: Sql. Results of TypeFactory::leastRestrictiveType are
compatible with legal type transformations
Key: IGNITE-22358
URL: https://issues.apache.org/jira/browse/IGNITE-22358
Project: Ignite
Issue Type: Improvement
Components: sql
Reporter: Maksim Zhuravkov
{noformat}
SELECT 1 UNION ALL SELECT '2000-01-01'::DATE
# returns: DATE, DATE
{noformat}
Although a cast from an INT to DATE is not possible according to type
transformation rules:
{noformat}
SELECT 1::DATE
# Error: Cast function cannot convert value of type INTEGER to type DATE
{noformat}
This query should also return an error because it is not possible to convert an
INT into a DATE.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)