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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieMergeHandle.java:
##########
@@ -116,17 +117,19 @@
   public HoodieMergeHandle(HoodieWriteConfig config, String instantTime, 
HoodieTable<T, I, K, O> hoodieTable,
                            Iterator<HoodieRecord<T>> recordItr, String 
partitionPath, String fileId,
                            TaskContextSupplier taskContextSupplier, 
Option<BaseKeyGenerator> keyGeneratorOpt) {
-    this(config, instantTime, hoodieTable, recordItr, partitionPath, fileId, 
taskContextSupplier,
-        hoodieTable.getBaseFileOnlyView().getLatestBaseFile(partitionPath, 
fileId).get(), keyGeneratorOpt);
+    super(config, instantTime, partitionPath, fileId, hoodieTable, 
taskContextSupplier);
+    Option<HoodieBaseFile> baseFileOp = 
hoodieTable.getBaseFileOnlyView().getLatestBaseFile(partitionPath, fileId);
+    if (!baseFileOp.isPresent()) {
+      throw new NoSuchElementException(String.format("FileID %s of 
partitionPath %s is not exist, But record loc is 'U' ", fileId, partitionPath));
+    }

Review Comment:
   The loc `U` is special in Flink, we should not put it in the log of 
`HoodieMergeHandle`.



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