SEPURI-SAI-KRISHNA commented on PR #29266:
URL: https://github.com/apache/flink/pull/29266#issuecomment-5946292955

   @MartijnVisser fair enough - I had put the behaviour evidence on FLINK-40731 
instead of here. Short version.
   
   Right now an unrecognized zone is silently treated as GMT, so 
`CONVERT_TZ('2018-03-14 11:00:00', 'UTC', 'UT+05:30')` hands back the input 
unshifted instead of failing or returning NULL. `ConvertTzRepro.java` on the 
ticket reproduces it against released jars with no build, same output on 1.20.4 
and 2.2.1.
   
   On which behaviour is the right one, two things already in the codebase:
   
   - `DateTimeUtils#convertTz` already returns NULL when the datetime string 
cannot be parsed, so NULL for a zone it cannot parse keeps the same contract.
   - `TO_TIMESTAMP_LTZ` also takes a time zone and already rejects an unknown 
one, with "Invalid timezone for parsing TIMESTAMP_LTZ" 
(`ToTimestampLtzInputTypeStrategy`).
   
   The docs list the accepted zone formats but say nothing about one that is 
not accepted, which is the gap. This PR goes with NULL. Throwing would also be 
defensible, it is just the bigger behaviour change.
   
   Where would you like that settled - here on the ticket, or do you want a 
dev@ thread?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to