the-other-tim-brown commented on code in PR #13694:
URL: https://github.com/apache/hudi/pull/13694#discussion_r2263956303


##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/HoodieFileGroupReader.java:
##########
@@ -280,11 +280,17 @@ public void close() throws IOException {
     }
   }
 
+  // don't make this public because caller is expected to set the iterator mode

Review Comment:
   ```suggestion
     // Caller is expected to set the iterator mode before invoking this 
internal method
   ```



##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/cdc/CDCFileGroupIterator.scala:
##########
@@ -540,15 +551,24 @@ class CDCFileGroupIterator(split: HoodieCDCFileGroupSplit,
     convertToUTF8String(HoodieCDCUtils.recordToJson(record))
   }
 
-  private def merge(currentRecord: InternalRow, newRecord: InternalRow): 
ImmutablePair[HoodieSparkRecord, Schema] = {
-    recordMerger.merge(new HoodieSparkRecord(currentRecord, structTypeSchema), 
avroSchema,
-      new HoodieSparkRecord(newRecord, structTypeSchema), avroSchema, props)
-      .get().asInstanceOf[ImmutablePair[HoodieSparkRecord, Schema]]
+  private def merge(currentRecord: BufferedRecord[InternalRow], newRecord: 
BufferedRecord[InternalRow]): BufferedRecord[InternalRow] = {
+    if (!isPartialMergeEnabled && keyBasedFileGroupRecordBuffer.isPresent && 
keyBasedFileGroupRecordBuffer.get().isPartialMergingEnabled) {

Review Comment:
   is it possible to process multiple log files in this iterator? If so, what 
happens if the next log file does not have partial encodings for the updates?



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