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

Caican Cai commented on CALCITE-6544:
-------------------------------------

[~julianhyde]Hi, So is this a bug, if so I will try to fix it

> Calcite's bigquery Dialect date_add and date_sub functions allow 0000 and BC 
> as results
> ---------------------------------------------------------------------------------------
>
>                 Key: CALCITE-6544
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6544
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.37.0
>            Reporter: Caican Cai
>            Priority: Major
>             Fix For: 1.38.0
>
>
> calcite:
> {code:java}
> f.checkScalar("date_add(date '0001-01-01', interval '-367' day)",
>         "000/-12-31",
>         "DATE NOT NULL");
> {code}
> bigquery
> {code:java}
> date_add(date '0001-01-01', interval '-367' day)
> Adding -367 DAY to date 0001-01-01 causes overflow
> {code}
> More details: https://issues.apache.org/jira/browse/CALCITE-6536



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

Reply via email to