[
https://issues.apache.org/jira/browse/FLINK-40731?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
sepuri sai krishna updated FLINK-40731:
---------------------------------------
Release Note: {{CONVERT_TZ}} now returns NULL when a time zone argument is
not a recognized zone id, instead of converting as if GMT had been given.
Queries that relied on the previous behaviour will see NULL where they
previously received a wrong timestamp. Offset ids such as {{+08:00}} and
{{UTC+01:00}}, which were also treated as GMT, are now honoured.
> CONVERT_TZ silently returns a wrong timestamp for a time zone it does not
> recognize
> -----------------------------------------------------------------------------------
>
> Key: FLINK-40731
> URL: https://issues.apache.org/jira/browse/FLINK-40731
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / Runtime
> Affects Versions: 2.4.0
> Reporter: sepuri sai krishna
> Priority: Major
> Labels: pull-request-available
>
> When {{CONVERT_TZ}} does not recognize a time zone it returns a
> converted-looking
> timestamp that is wrong, with no error and nothing logged. Zone ids are case
> sensitive, so an ordinary typo is enough:
> {code:sql}
> CONVERT_TZ('2024-01-01 12:00:00', 'UTC', 'America/New_York') -- 2024-01-01
> 07:00:00
> CONVERT_TZ('2024-01-01 12:00:00', 'UTC', 'america/new_york') -- 2024-01-01
> 12:00:00
> {code}
> Other bad input is already reported as NULL:
> {code:sql}
> CONVERT_TZ('not a timestamp', 'UTC', 'America/New_York') -- NULL
> {code}
> Reproduced on master. I have a fix and tests ready, could someone assign this
> to
> me?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)