yihua commented on code in PR #12297:
URL: https://github.com/apache/hudi/pull/12297#discussion_r1857302151
##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/TestDataSourceDefaults.scala:
##########
@@ -570,8 +570,8 @@ class TestDataSourceDefaults extends ScalaAssertionSupport {
val laterOrderingVal: Object = laterRecord.get("favoriteIntNumber")
val newerPayload = new OverwriteWithLatestAvroPayload(laterRecord,
HoodieAvroUtils.convertValueForSpecificDataTypes(fieldSchema, laterOrderingVal,
false).asInstanceOf[Comparable[_]])
- // it will provide the record with greatest combine value
- val preCombinedPayload = basePayload.preCombine(newerPayload)
+ // it always returns the latest payload.
+ val preCombinedPayload = newerPayload.preCombine(basePayload)
Review Comment:
Fix validation instead since we need to validate the preCombine to be called
on a payload with a smaller ordering field.
--
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]