Canner/wren-engine

Handle `date_trunc` function return type for BigQuery

goldmedal opened this issue · 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.