-
Notifications
You must be signed in to change notification settings - Fork 4
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
Timestamp issue #60
Comments
Same for SELECT MAKE_TIMESTAMP(1230219000000000) AS timestamp_value Expected query is SELECT MAKE_TIMESTAMP(1230219000000000) AT TIME ZONE 'UTC' AS timestamp_value Bigquery output is:
whereas duckdb is:
|
Same applies for epoch_ms / epoch_us / epoch when no timezone is provided |
SELECT PARSE_TIMESTAMP('%c', 'Thu Dec 25 07:30:00 2008') AS parsed; should be transpiled as SELECT CAST(strptime('Thu Dec 25 07:30:00 2008', '%a %b %-d %-H:%M:%S %Y') AS TIMESTAMP) AT TIME ZONE 'UTC' AS parsed |
SELECT
FORMAT_TIMESTAMP('%Y-%m-%dT%H:%M:%SZ', TIMESTAMP '2050-12-25 15:30:55', 'UTC') AS formatted,
FORMAT_TIMESTAMP('%Y-%m-%dT%H:%M:%SZ', TIMESTAMP '2050-12-25 15:30:55', 'Europe/Paris') AS paris;
should be transpiled as SELECT StrfTime(TIMESTAMPTZ '2050-12-25 15:30:55+00' AT TIME ZONE 'UTC', '%Y-%m-%dT%H:%M:%SZ') AS formatted, StrfTime(TIMESTAMPTZ '2050-12-25 15:30:55+00' AT TIME ZONE 'Europe/Paris', '%Y-%m-%dT%H:%M:%SZ') AS paris |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In bigquery, timestamp is implicitly set to UTC.
Given
It gets translated to:
But output differs.
Bigquery:
duckdb
Expected transpiled query:
Notice that we changed TIMESTAMP to TIMESTAMPTZ by suffixing timestamp with UTC offset.
The text was updated successfully, but these errors were encountered: