alexeykudinkin commented on code in PR #6697:
URL: https://github.com/apache/hudi/pull/6697#discussion_r977013800
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieSortedMergeHandle.java:
##########
@@ -93,13 +94,18 @@ public void write(GenericRecord oldRecord) {
throw new HoodieUpsertException("Insert/Update not in sorted order");
}
try {
+ Option<IndexedRecord> insertRecord;
if (useWriterSchemaForCompaction) {
- writeRecord(hoodieRecord,
hoodieRecord.getData().getInsertValue(tableSchemaWithMetaFields,
config.getProps()));
+ insertRecord =
hoodieRecord.getData().getInsertValue(tableSchemaWithMetaFields,
config.getProps());
} else {
- writeRecord(hoodieRecord,
hoodieRecord.getData().getInsertValue(tableSchema, config.getProps()));
+ insertRecord = hoodieRecord.getData().getInsertValue(tableSchema,
config.getProps());
}
+ writeRecord(hoodieRecord, insertRecord);
insertRecordsWritten++;
writtenRecordKeys.add(keyToPreWrite);
+ if (cdcEnabled) {
+ cdcLogger.put(hoodieRecord, null, insertRecord);
+ }
Review Comment:
Did you mean sub-class of the `MergeHandle`?
If that's the case, I'd actually argue we shouldn't be creating sub-classes
for every feature as otherwise it will quickly become unmanageable
--
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]