yihua opened a new pull request, #20822:
URL: https://github.com/apache/hudi/pull/20822

   ### Describe the issue this Pull Request addresses
   
   closes #20816
   
   A Spark SQL write of a TIMESTAMP partition value with more than one 
fractional digit fails with `Invalid format` on the Spark record path and the 
bulk insert row writer, because `SqlKeyGenerator` parses the 
`java.sql.Timestamp` string the delegate key generator printed with the Joda 
pattern `yyyy-MM-dd HH:mm:ss.S`.
   
   ### Summary and Changelog
   
   The row paths now parse one to nine fractional digits and truncate the value 
to whole seconds, as the Avro path already does. A value that parsed before 
gives the same path. The new case in `TestSqlKeyGenerator` covers the 
InternalRow, Row and Avro paths with a microsecond value, and fails on master 
with `Invalid format: "2026-08-11 00:00:00.123" is malformed at "23"`.
   
   The fix for #20817 builds on this commit, since the tables that keep 
truncating need it.
   
   ### Impact
   
   Spark SQL writes that failed now succeed. No change for values that already 
worked.
   
   ### Risk Level
   
   low
   
   ### Documentation Update
   
   none
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Enough context is provided in the sections above
   - [ ] Adequate tests were added if applicable
   


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