beyond1920 commented on code in PR #10219:
URL: https://github.com/apache/hudi/pull/10219#discussion_r1411546712


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/Iterators.scala:
##########
@@ -273,17 +299,26 @@ class RecordMergingFileIterator(logFiles: 
List[HoodieLogFile],
         val result = recordMerger.merge(curRecord, baseFileReaderAvroSchema, 
newRecord, logFileReaderAvroSchema, payloadProps)
         toScalaOption(result)
           .map { r =>
-            val schema = HoodieInternalRowUtils.getCachedSchema(r.getRight)
-            val projection = 
HoodieInternalRowUtils.getCachedUnsafeProjection(schema, structTypeSchema)
-            projection.apply(r.getLeft.getData.asInstanceOf[InternalRow])
+            val data = r.getLeft.getData.asInstanceOf[InternalRow]
+            if (isDeleteData(data)) {
+              null

Review Comment:
   It's the return type of `optional.map` function.
   To better readable, I update the pr in the latest commit to change 
optional.map to optional.flatmap to avoid Some(null).



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