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

Julian Hyde commented on CALCITE-5360:
--------------------------------------

BigQuery has a syntax for free-standing interval literals and a different 
syntax for {{INTERVAL}} inside the {{TIMESTAMP_ADD}} function, but I disagree 
with their approach. In Calcite there should be only one interval literal 
syntax. As you say, to fix CALCITE-5422 we would need to extend 
{{IntervalQualifierStart()}} in the parser.

> Implement BigQuery TIMESTAMP_ADD and TIMESTAMP_DIFF
> ---------------------------------------------------
>
>                 Key: CALCITE-5360
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5360
>             Project: Calcite
>          Issue Type: Sub-task
>          Components: core
>            Reporter: TJ Banghart
>            Assignee: Tanner Clary
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Calcite already supports TIMESTAMPADD and TIMESTAMPDIFF. We should try 
> mapping the BQ style syntax to these already implemented functions.
> We did something similar for TIMESTAMP_TRUNC and TIME_TRUNC which 
> conveniently mapped to FLOOR in 
> [CALCITE-5269|https://issues.apache.org/jira/browse/CALCITE-5269]



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

Reply via email to