the-other-tim-brown commented on code in PR #13445:
URL: https://github.com/apache/hudi/pull/13445#discussion_r2151164771


##########
hudi-client/hudi-spark-client/src/main/scala/org/apache/hudi/BaseSparkInternalRowReaderContext.java:
##########
@@ -110,6 +110,18 @@ public HoodieRecord<InternalRow> 
constructHoodieRecord(BufferedRecord<InternalRo
     return new HoodieSparkRecord(hoodieKey, row, 
HoodieInternalRowUtils.getCachedSchema(schema), false);
   }
 
+  @Override
+  public HoodieRecord<InternalRow> constructHoodieRecord(InternalRow row, 
Schema schema, Option<String> orderingFieldName) {
+    if (row instanceof HoodieInternalRow && ((HoodieInternalRow) 
row).isDeleteOperation()) {
+      return new HoodieEmptyRecord<>(
+          new 
HoodieKey(row.getUTF8String(HoodieRecord.RECORD_KEY_META_FIELD_ORD).toString(), 
partitionPath),

Review Comment:
   The `HoodieSparkRecord` will be marked as a delete if the row is `null`. 
Using an empty record is the common pattern adopted across the engines.



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