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

   ### Change Logs
   
   This MR fixes `ClassCastException` while reading by Spark, when 
`TimestampBasedKeyGenerator` is used.
   Previous fix https://github.com/apache/hudi/pull/11501 has been reverted by 
https://github.com/apache/hudi/pull/11586.
   In the previous fix nulls have been passed instead of parsing partition 
paths.
   Anyway, we shouldn't parse partition paths, but in this fix partition paths 
are passed as it is. `UTF8String`s are passed instead of nulls as I mentioned 
in the discussion under https://github.com/apache/hudi/pull/11501.
   
   ### Impact
   
   Fixes `ClassCastException`. Save previous behavior for unaffected cases.
   
   ### Risk level (write none, low medium or high below)
   
   Low. Affects only if `TimestampBasedKeyGenerator` of `SCALAR`, 
`UNIX_TIMESTAMP` or `EPOCHMILLISECONDS` types is used. There is added 
`TestSparkSqlWithTimestampKeyGenerator`.
   
   ### Documentation Update
   
   No need.
   
   ### Contributor's checklist
   
   - [x] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [x] Change Logs and Impact were stated clearly
   - [x] Adequate tests were added if applicable
   - [ ] CI passed
   


-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to