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


##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java:
##########
@@ -1656,9 +1664,17 @@ public static 
List<HoodieColumnRangeMetadata<Comparable>> getLogFileColumnRangeM
           
.withLatestInstantTime(datasetMetaClient.getActiveTimeline().getCommitsTimeline().lastInstant().get().requestedTime())
           .withReaderSchema(writerSchemaOpt.get())
           .withTableMetaClient(datasetMetaClient)
-          .withLogRecordScannerCallback(records::add)
           .build();
-      scanner.scan();
+
+      Iterator<HoodieRecord<?>> recordIterator = scanner.iterator();
+      while (recordIterator.hasNext()) {
+        try {
+          records.add(recordIterator.next());
+        } catch (Exception e) {

Review Comment:
   The code is exactly the same if we collect all the records in the collection 
again , maybe we do not remove those two callbacks and just add a new iterator 
impl for the case that really need it: the Flink streaming reader.



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