danny0405 commented on code in PR #13445:
URL: https://github.com/apache/hudi/pull/13445#discussion_r2151104904
##########
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:
if the `row` already been marked as `delete`, we can just construct
`HoodieSparkRecord`?
--
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]