LinMingQiang commented on code in PR #5788:
URL: https://github.com/apache/hudi/pull/5788#discussion_r894112596
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieMergeHandle.java:
##########
@@ -116,8 +117,14 @@
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));
+ }
+ init(fileId, recordItr);
Review Comment:
OK, I've modified it,You can check it again. thx.
--
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]