[
https://issues.apache.org/jira/browse/CALCITE-5360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17640910#comment-17640910
]
Tanner Clary commented on CALCITE-5360:
---------------------------------------
{{TIMESTAMP_ADD}} accepts two arguments, the first being a timestamp and the
second being a pseudo interval literal. This makes accepting custom timeframes
difficult. An example using a built-in time unit would be
{{{}TIMESTAMP_ADD(TIMESTAMP '2008-12-25 15:30:00', INTERVAL '5' MINUTE>{}}}.
Currently, using a custom timeframe in place of a built-in time unit results in
a null operand error. The question is whether {{TIMESTAMP_ADD}} should support
custom timeframes or not given the issue with the syntax of the function's
arguments.
> 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: TJ Banghart
> Priority: Major
>
> 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)