Pavel Pereslegin created IGNITE-25010:
-----------------------------------------

             Summary: Add stricter date patterns validation for CAST FORMAT
                 Key: IGNITE-25010
                 URL: https://issues.apache.org/jira/browse/IGNITE-25010
             Project: Ignite
          Issue Type: Bug
          Components: sql
            Reporter: Pavel Pereslegin


This is clone of https://issues.apache.org/jira/browse/CALCITE-6922 issue

Currently, when using CAST with FORMAT we can specify strange 
date/time/timestamp patterns that (I believe) are not SQL standard compliant 
and which produce confusing results.
{code:java}
sql("SELECT CAST('9999999-9999999-9999999' AS DATE FORMAT 'y-MM-dd')");         
     // -898510-03-05
sql("SELECT CAST('9999999-9999999-9999999' AS DATE FORMAT 
'y-MM-dd')::VARCHAR");     // +0'-0(-.
{code}



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

Reply via email to