Davis-Zhang-Onehouse commented on code in PR #12242:
URL: https://github.com/apache/hudi/pull/12242#discussion_r1841234080


##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/payload/ExpressionPayload.scala:
##########
@@ -132,12 +133,10 @@ class ExpressionPayload(@transient record: GenericRecord,
           .serialize(resultingRow)
           .asInstanceOf[GenericRecord]
 
-        if (targetRecord.isEmpty || 
needUpdatingPersistedRecord(targetRecord.get, resultingAvroRecord, properties)) 
{
-          resultRecordOpt = HOption.of(resultingAvroRecord)
+        resultRecordOpt = if (targetRecord.isEmpty) {

Review Comment:
   if you check the caller of the method, for MOR table regardless if it is 
matched record or not we all end up here. I didn't have further context on why 
the code is written in that way but focusing on fixing the correctness issue of 
MIT.



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