Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle date_trunc function return type for BigQuery #468

Closed
goldmedal opened this issue Feb 22, 2024 · 0 comments
Closed

Handle date_trunc function return type for BigQuery #468

goldmedal opened this issue Feb 22, 2024 · 0 comments

Comments

@goldmedal
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant