You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Pavel Pereslegin (Jira)" <ji...@apache.org> on 2025/03/27 16:17:00 UTC
[jira] [Created] (IGNITE-24947) Sql. Add validation for cast VARCHAR::DATE/TIMESTAMP with zero DAY value
Pavel Pereslegin created IGNITE-24947:
-----------------------------------------
Summary: Sql. Add validation for cast VARCHAR::DATE/TIMESTAMP with zero DAY value
Key: IGNITE-24947
URL: https://issues.apache.org/jira/browse/IGNITE-24947
Project: Ignite
Issue Type: Bug
Components: sql
Reporter: Pavel Pereslegin
{code:sql}
SELECT '0001-00-01'::DATE -- Throws: Value of MONTH field is out of range in '0001-00-01'
SELECT '0001-01-00'::DATE -- produces invalid result [0000-12-31]
{code}
This affects TIMESTAMP/TIMESTAMP_WITH_LOCAL_TIME_ZONE also.
For literal value exception is thrown.
{code:sql}
SELECT date '0001-01-00' -- Illegal DATE literal '0001-01-00': not in format 'yyyy-MM-dd'
{code}
Not exact, but looks acceptable.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)