wzx140 commented on code in PR #7021:
URL: https://github.com/apache/hudi/pull/7021#discussion_r1027289037
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieAppendHandle.java:
##########
@@ -215,18 +216,16 @@ private Option<HoodieRecord>
prepareRecord(HoodieRecord<T> hoodieRecord) {
// If the format can not record the operation field, nullify the DELETE
payload manually.
boolean nullifyPayload =
HoodieOperation.isDelete(hoodieRecord.getOperation()) &&
!config.allowOperationMetadataField();
recordProperties.put(HoodiePayloadProps.PAYLOAD_IS_UPDATE_RECORD_FOR_MOR,
String.valueOf(isUpdateRecord));
- Option<HoodieRecord> finalRecord = Option.empty();
- if (!nullifyPayload && !hoodieRecord.isDelete(tableSchema,
recordProperties)) {
- if (hoodieRecord.shouldIgnore(tableSchema, recordProperties)) {
- return Option.of(hoodieRecord);
+ Option<HoodieRecord> finalRecord = nullifyPayload ? Option.empty() :
Option.of(hoodieRecord.deserialization(tableSchema, recordProperties));
+ // Check for delete
+ if (finalRecord.isPresent() && !finalRecord.get().isDelete(tableSchema,
recordProperties)) {
+ // Check for ignore ExpressionPayload
+ if (finalRecord.get().shouldIgnore(tableSchema, recordProperties)) {
+ return finalRecord;
Review Comment:
The logic here is aligned with the previous one. What status will trigger
"This will delete the record"?
--
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]