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

   ### Describe the issue this Pull Request addresses
   
   Log compaction can produce delete records with engine-specific ordering 
values, such as Spark strings and decimals. Native log writers may use a 
different record context from the file group reader, causing incompatible types 
during serialization. Inline delete blocks also require these ordering values 
to be converted to Java types before serialization.
   
   Closes [apache/hudi#20365](https://github.com/apache/hudi/issues/20365).
   
   This PR addresses the scenarios covered by 
[apache/hudi#20366](https://github.com/apache/hudi/pull/20366) through 
reader/writer context alignment and lazy Java ordering conversion.
   
   ### Summary and Changelog
   
   - Pass the file group reader's record context to both native and inline log 
append handles during log compaction.
   - Convert inline delete ordering values through `RecordContext`, while 
retaining engine values in records for comparisons.
   - Extend the existing Spark and Flink ordering converters with Java 
conversion. Flink lazily initializes each conversion direction and reuses the 
reader's initialized converter.
   - Use the write-side UTC configuration when creating ordinary Flink write 
contexts.
   - Deprecate `HoodieRecord.getColumnValueAsJava` in favor of record-context 
conversion.
   
   Builds on the native delete stored-value handling in 
[apache/hudi#20373](https://github.com/apache/hudi/pull/20373).
   
   ### Impact
   
   Fixes delete rewriting during inline and native log compaction, including 
configurations where the table's write record type differs from the reader's 
engine type. Older updates remain suppressed by a compacted delete, while newer 
updates can recreate the record.
   
   Conversion is owned by the record context, without adding converter state to 
individual records. No storage format or configuration changes are introduced.
   
   ### Risk Level
   
   Medium. The changes affect shared delete serialization paths and Spark/Flink 
ordering conversion.
   
   ### Documentation Update
   
   none
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [x] Enough context is provided in the sections above
   - [x] 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