[ 
https://issues.apache.org/jira/browse/CALCITE-5957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17759706#comment-17759706
 ] 

Julian Hyde commented on CALCITE-5957:
--------------------------------------

I don't know what the SQL standard says, or what other DBs do, but I think that 
leading zeros should be optional in the input string, and punctuation ('-', ' 
', ':' are typical in dates and times) should be mandatory. For example, for 
DATE values, "1945-02-02" and "1945-2-2" should be valid, and "19450202" and 
"194522" should not.

> Valid DATE '1945-2-2' is not accepted due to regression
> -------------------------------------------------------
>
>                 Key: CALCITE-5957
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5957
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.35.0
>            Reporter: Runkang He
>            Priority: Major
>         Attachments: image-2023-08-27-19-09-33-284.png
>
>
> DATE '1945-2-2' is a valid date. In CALCITE-5923 when we turn on the result 
> check of `testCastStringToDateTime`, we find that Calcite accepted DATE 
> '1945-2-2' before CALCITE-5678 but not afterwards, so this is a regression 
> that we need to fix.



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

Reply via email to