yihua commented on code in PR #14031:
URL: https://github.com/apache/hudi/pull/14031#discussion_r2402139687


##########
hudi-common/src/main/java/org/apache/hudi/common/table/view/AbstractTableFileSystemView.java:
##########
@@ -1552,13 +1565,27 @@ private static FileSlice 
mergeCompactionPendingFileSlices(FileSlice lastSlice, F
    *
    * @param fileGroup File Group for which the file slice belongs to
    * @param fileSlice File Slice which needs to be merged
-   */
-  private FileSlice fetchMergedFileSlice(HoodieFileGroup fileGroup, FileSlice 
fileSlice) {
+   * @param currentInstantTime Instant time of the current transaction
+   * @param includeBaseFileUnderInflightCompaction whether to include base 
file under inflight compaction
+   *                                               when merging file slices
+   */
+  private FileSlice fetchMergedFileSlice(HoodieFileGroup fileGroup,
+                                         FileSlice fileSlice,
+                                         String currentInstantTime,
+                                         boolean 
includeBaseFileUnderInflightCompaction) {
     // if the file-group is under construction, pick the latest before 
compaction instant time.
     Option<Pair<String, CompactionOperation>> compactionOpWithInstant =
         getPendingCompactionOperationWithInstant(fileGroup.getFileGroupId());
     if (compactionOpWithInstant.isPresent()) {
       String compactionInstantTime = compactionOpWithInstant.get().getKey();
+      // Only if includeBaseFileUnderInflightCompaction is true, i.e., the 
base file from inflight
+      // compaction should be considered in the latest merged file slice, we 
check the file slice.

Review Comment:
   Synced offline and it is understood now.



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