sepuri sai krishna created FLINK-40731:
------------------------------------------

             Summary: 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


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)

Reply via email to