Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CALCITE-5508] Add constructor functions for DATE, TIME, TIMESTAMP, D…
…ATETIME (enabled in BigQuery library) New DATE functions such as DATE(int, int, int) needs to work alongside the existing DATE(string) function; all are validated usig the type operand checker, but after validation DATE(string) is desugared to CAST(string AS DATE). Following [CALCITE-5424] Customize handling of literals based on type system which deferred validation of DATE, TIME, TIMESTAMP literals, we now also allow DATETIME literal. (In BigQuery mode it is mapped to a literal in Calcite's TIMESTAMP type.) Also includes a fix for [CALCITE-5498] BigQuery TIMESTAMP() function short notation for timezone offsets isn’t supported in Java 8 In a few places I had to change test output. I removed "UTC" from test output and added TODO comments; these changes should reverted when [CALCITE-5446] Support TIMESTAMP WITH LOCAL TIME ZONE type in JDBC driver is fixed. And I manually added the offset to some TIMESTAMP WITH LOCAL TIME ZONE LITERALS (which were written as TIMESTAMP because big-query.iq uses BigQuery's type aliasing); these changes can be reverted when [CALCITE-5496] Support time zones when parsing TIMESTAMP WITH LOCAL TIME ZONE is fixed. Close #3023
- Loading branch information