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

Julian Hyde commented on CALCITE-5290:
--------------------------------------

[~mkou], I believe that for your project you want {{DATE_TRUNC}} consistent 
with BigQuery, not Postgres, and therefore you will want to implement 
CALCITE-5180 and not this case.

> Add DATE_TRUNC function consistent with Postgres
> ------------------------------------------------
>
>                 Key: CALCITE-5290
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5290
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Priority: Major
>
> Add {{DATE_TRUNC}} function consistent with Postgres. Per the 
> [specification|https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-TRUNC],
>  syntax is as follows:
> {code}
> DATE_TRUNC(<string>, <timestamp | date | time>)
> {code}
> It is a different (and more complex) specification than BigQuery's DATE_TRUNC 
> (see CALCITE-5180), which has the following syntax:
> {code}
> DATE_TRUNC(<date>, <interval>)
> {code}
> Postgres DATE_TRUNC would be implemented after CALCITE-5155 and would allow 
> user-defined time frames in the {{field}} argument.



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

Reply via email to