danny0405 commented on code in PR #13444:
URL: https://github.com/apache/hudi/pull/13444#discussion_r2188898741


##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/FileGroupRecordBuffer.java:
##########
@@ -565,27 +570,62 @@ protected boolean hasNextBaseRecord(T baseRecord, 
BufferedRecord<T> logRecordInf
       Pair<Boolean, T> isDeleteAndRecord = merge(baseRecordInfo, 
logRecordInfo);
       if (!isDeleteAndRecord.getLeft()) {
         // Updates
-        nextRecord = readerContext.seal(isDeleteAndRecord.getRight());
+        nextRecord = 
readerContext.seal(applyOutputSchemaConversion(isDeleteAndRecord.getRight()));

Review Comment:
   > The finalMerge is never called in this case.
   
   The are two cases you plugin in the cdc logging function:
   
   1. `FileGroupRecordBuffer#hasNextBaseRecord`;
   2. `FileGroupRecordBuffer#hasNextLogRecord`.
   
   The `finalMerge` plays a role in the 1st case, but you are right, in case2, 
we also need to trigger the cdc logging.
   Let's introduce another two `record buffers` to override the two cases when 
an update callback is there.
   
   > Can you explain what you mean by this please?
   
   Like the new introduced check per-row:
   
   ```java
   if (isDeleteAndRecord.getRight() != baseRecord) {
             callbackOption.ifPresent(
   ...
   callbackOption.ifPresent(
   ...
   ```



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