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

Caican Cai commented on CALCITE-6536:
-------------------------------------

[~zabetak] Hi, Do you mean that calcite does not allow dates like 000/-12-31 as 
parameters, just like 0000-01-01?
But they can be returned as results in calcite. Is this allowed?

I'm not sure about the standard of this part, thank you




> Dates before BC cannot be used as arguments to date functions
> -------------------------------------------------------------
>
>                 Key: CALCITE-6536
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6536
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.37.0
>            Reporter: Caican Cai
>            Priority: Major
>             Fix For: 1.38.0
>
>
> {code:java}
> f.checkScalar("date_add(date '0001-01-01', interval '-367' day)",
>         "000/-12-31",
>         "DATE NOT NULL");
> {code}
> This test is correct, but when I use 000/-12-31 as the parameter to test it 
> fails
> {code:java}
>     f.checkScalar("date_add(date '000/-12-31', interval 5 day)",
>         "000-12-31",
>         "DATE NOT NULL");
> org.apache.calcite.runtime.CalciteContextException: From line 1, column 18 to 
> line 1, column 34: Illegal DATE literal '000/-12-31': not in format 
> 'yyyy-MM-dd'
> {code}



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

Reply via email to