wren-engine icon indicating copy to clipboard operation
wren-engine copied to clipboard

Handle `date_trunc` function return type for BigQuery

Open goldmedal opened this issue 1 year ago • 0 comments

In the trino function list, date_trunc return TIMESTAMP. However, trino also supports the implicit casting for TIMESTAMP and DATE type. It can work fine to compare a date and date_trunc() expression. For BigQuery, it doesn't support to type coercion between date and timestamp. That's why it provide two truncation function: date_trunc and timestamp_trunc. We should map trino's date_trunc to them in the run time.

goldmedal avatar Feb 22 '24 02:02 goldmedal