TheR1sing3un commented on code in PR #13342:
URL: https://github.com/apache/hudi/pull/13342#discussion_r2104177109
##########
hudi-common/src/main/java/org/apache/hudi/common/table/view/AbstractTableFileSystemView.java:
##########
@@ -899,7 +924,11 @@ public final Stream<FileSlice>
getLatestFileSlicesStateless(String partitionStr)
.filter(Option::isPresent).map(Option::get)
.flatMap(slice -> tableVersion8AndAbove()
? this.filterUncommittedFiles(slice, true)
- : this.filterBaseFileAfterPendingCompaction(slice, true));
+ : this.filterBaseFileAfterPendingCompaction(slice, true))
+ .flatMap(slice -> tableVersion8AndAbove()
+ // for table version 8 and above, we need to filter out empty
file slices
+ ? this.filterOutEmptyFileSlice(slice)
Review Comment:
same as above
##########
hudi-common/src/main/java/org/apache/hudi/common/table/view/AbstractTableFileSystemView.java:
##########
@@ -930,9 +959,13 @@ public final Option<FileSlice> getLatestFileSlice(String
partitionStr, String fi
if (!fs.isPresent()) {
return Option.empty();
}
- Stream<FileSlice> fileSlices = tableVersion8AndAbove()
+ Stream<FileSlice> fileSlices = (tableVersion8AndAbove()
? this.filterUncommittedFiles(fs.get(), true)
- : this.filterBaseFileAfterPendingCompaction(fs.get(), true);
+ : this.filterBaseFileAfterPendingCompaction(fs.get(), true))
+ .flatMap(slice -> tableVersion8AndAbove()
+ // for table version 8 and above, we need to filter out empty file
slices
+ ? this.filterOutEmptyFileSlice(slice)
+ : Stream.of(slice));
Review Comment:
same as above
--
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]