[ https://issues.apache.org/jira/browse/CALCITE-5269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17607417#comment-17607417 ]
TJ Banghart commented on CALCITE-5269: -------------------------------------- Hey [~julianhyde] thanks for taking a look. It's great to hear that about the changes you're working on in CALCITE-5155. It sounds like custom time units would be a welcome addition to several other time functions such as {{EXTRACT}}. I'll go ahead and pause on the {{TIME_TRUNC}} and {{TIMESTAMP_TRUNCĀ }} implementation for the time being. I am sure we'll want these operators to be compatible with the changes in CALCITE-5155 as well. There are other BQ time related features I can look into in the meantime. I am curious how you think we should treat BQ's {{DATETIME}} [(ref)|https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#datetime_type]. BQ's {{DATETIME}} is similar to wall clock time with no implicit timezone, but BQ's {{TIMESTAMP}} also does not have timezones and instead only displays timestamps in a particular timezone when requested [(ref)|https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#timestamp_type]. Would it be safe to treat a BQ {{DATETIME}} as a Calcite {{TIMESTAMP}} with no timezone for the purposes of {{DATETIME}} constructors and the operand/return types for [function calls|https://cloud.google.com/bigquery/docs/reference/standard-sql/datetime_functions]? I would think yes but wouldn't want to muddy the waters if {{DATETIME}} is significantly different from what Calcite understands as a {{TIMESTAMP}}. > Implement BigQuery TIME_TRUNC and TIMESTAMP_TRUNC functions > ----------------------------------------------------------- > > Key: CALCITE-5269 > URL: https://issues.apache.org/jira/browse/CALCITE-5269 > Project: Calcite > Issue Type: Sub-task > Reporter: TJ Banghart > Assignee: TJ Banghart > Priority: Major > > Implement missing BigQuery functions for: > * TIME_TRUNC > * TIMESTAMP_TRUNC -- This message was sent by Atlassian Jira (v8.20.10#820010)