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

Tanner Clary edited comment on CALCITE-5360 at 12/7/22 3:32 AM:
----------------------------------------------------------------

[~julianhyde] Thanks for the review! I agree with all of the changes you 
mentioned. The only thing I am confused about is regarding what fractional 
second units (milli, nano, micro) the function should accept. The BQ docs 
mention "microsecond, millisecond, second, minute, hour, day" as the supported 
units. If we want to mirror this set, I think some adjustments may be necessary 
in the parser because the function only works with second..year as defined in 
the IntervalQualifierStart() method. This is the only thing I believe I need 
clarification on. Otherwise, I have cherry-picked the commit you listed (thank 
you for that) and am ready to push once it's settled what units should pass. 
Thanks again.


was (Author: JIRAUSER298151):
[~julianhyde] Thanks for the review! I agree with all of the changes you 
mentioned. The only thing I am confused about is regarding what fractional 
second units (milli, nano, micro) the function should accept. The BQ docs 
mention "microsecond, millisecond, second, minute, hour, day" as the supported 
units. If we want to mirror this set, I think some adjustments may be necessary 
in the parser because the function only works with second..year as defined in 
the IntervalQualifierStart() method. This is the only thing I believe I need 
clarification on. Thanks again.

> 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