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

   Fixes #40860
   
   IcebergIO only accepted a `T` between date and time when writing a `STRING` 
value to a `timestamp` or `timestamptz` column. A space, which RFC 3339 section 
5.6 allows and Python's `str(datetime)` produces, threw 
`DateTimeParseException`.
   
   When the character after the date is a space, the value is now parsed with a 
formatter that expects a space instead of `T`. All other values go through the 
existing `OffsetDateTime.parse` / `LocalDateTime.parse` calls unchanged.
   
   - The separator is checked up front instead of catching the parse exception 
and retrying, as BigQueryIO does. In a local benchmark, the retry made each 
space-separated value about 2.4x slower to parse (~1130 ns vs ~480 ns).
   - Exactly one separator is accepted. `2024-10-08 T13:18:20` (the output 
behind #40110) is still rejected.
   - The read path is unchanged.
   
   Testing: added cases to `IcebergUtilsTest` for both column types, including 
invalid separators. `:sdks:java:io:iceberg:test` passes.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


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