linliu-code opened a new pull request, #679: URL: https://github.com/apache/hudi-rs/pull/679
## Description A KEEP_VALUES partial update that lost the ordering comparison had its columns dropped. The branch computed the union of the incoming and prior records, then handed it to the merger, which returned the prior unchanged whenever the prior won, so the union was computed and discarded. A key whose higher-ordering update arrived first lost every column unique to the later, lower-ordering update. Java folds in both directions: when the older record wins, `DefaultSparkRecordMerger.partialMerge` passes the loser as the base and overlays the winner on top, and `SparkRecordMergingUtils.mergePartialRecords` builds the result with the overlay argument's ordering value. So the union takes the winner's columns on any overlap and the winner's ordering value, and the loser contributes only the columns the winner omits. Carrying the loser's ordering value instead would be the more damaging bug: the union would sit at the loser's position and lose to any later update above it, including the base row. The fold now runs inside the `merge_in_place` closure, which also drops the extra `get` probe this branch was doing on top of the single-probe merge. COMMIT_TIME_ORDERING is unchanged: the incoming record is always the overlay winner, matching `OverwriteWithLatestSparkRecordMerger`. Follow-up to #660 ([discussion](https://github.com/apache/hudi-rs/pull/660#discussion_r3788329721)). ## How are the changes test-covered - [ ] N/A - [x] Automated tests (unit and/or integration tests) - [ ] Manual tests - [ ] Details are described below Two unit tests in `key_based.rs` covering out-of-order partials, both mutation-checked against the pre-fix behavior: discarding the union when the prior wins returns the loser's column as unset, and carrying the incoming's ordering value makes the whole update lose to the base row. The gold parity sweep and the `--no-default-features` leg are green. -- 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]
