danny0405 commented on code in PR #17838:
URL: https://github.com/apache/hudi/pull/17838#discussion_r2706748185
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/partitioner/BucketAssignFunction.java:
##########
@@ -173,23 +173,32 @@ protected void processRecord(HoodieFlinkInternalRow
record, String recordKey, Co
// if partition path changes, emit a delete record for old
partition path,
// then update the index state using location with new partition
path.
RowData row = record.getRowData();
+ RowKind orginalRowKind = row.getRowKind();
row.setRowKind(RowKind.DELETE);
+ // the operationType field is used as the index operation type,
and only 'I' and 'D' index operation will be written to the metadata table.
+ // for record key, whose partition path is updated, we simply
ignore the DELETE index record, and the location for this key will be updated
+ // by the following INSERT index record.
HoodieFlinkInternalRow deleteRecord =
- new HoodieFlinkInternalRow(record.getRecordKey(),
partitionFromState, fileIdFromState, "U", "D", false, row);
+ new HoodieFlinkInternalRow(record.getRecordKey(),
partitionFromState, fileIdFromState, "U", "U", false, row);
Review Comment:
shoud be `-U` I think.
--
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]