mananmangal opened a new pull request, #41027:
URL: https://github.com/apache/beam/pull/41027

   Fixes #41024
   
   IcebergIO only accepted an offset after the time when writing a `STRING` 
value to a `timestamptz` column. A string ending in a zone ID, such as 
`2024-10-08 13:18:20.053 UTC`, threw `DateTimeParseException`.
   
   `timestamptz` strings are now parsed as a date and time, then an optional 
offset, then an optional space and zone ID, e.g. `2024-10-08T13:18:20.053Z`, 
`2024-10-08 13:18:20.053+03:27` or `2024-10-08 13:18:20.053 America/New_York`.
   
   - If both an offset and a zone ID are present, the offset takes precedence.
   - A string with neither is read as UTC.
   - Zone IDs are case-sensitive, so `utc` is rejected.
   - A local time in a daylight saving gap or overlap resolves as in 
`ZonedDateTime.ofLocal`.
   - For both `timestamp` and `timestamptz`, the date and time may be separated 
by a `T`, a space, both, or neither. One formatter per column type replaces the 
separator check.
   - Strings that parse today keep the same result. Out-of-range dates are 
still rejected. The read path is unchanged.
   
   Testing: added cases to `IcebergUtilsTest` for zone IDs, an offset with a 
zone ID, strings without a zone, daylight saving transitions, separators, and 
invalid zones.
   


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