You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2024/08/26 17:02:00 UTC
[jira] [Commented] (CALCITE-6544) Calcite's bigquery Dialect date_add and date_sub functions allow 0000 and BC as results
[ https://issues.apache.org/jira/browse/CALCITE-6544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17876791#comment-17876791 ]
Julian Hyde commented on CALCITE-6544:
--------------------------------------
Maybe BigQuery's {{DATE}} data type has a different range than Calcite's, and it's not a difference in the {{DATE_ADD}} function.
> 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)