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


##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/LSMTimeline.java:
##########
@@ -140,9 +140,9 @@ public static Schema 
getReadSchema(HoodieArchivedTimeline.LoadMode loadMode) {
    * Returns whether the given file is located in the filter.
    */
   public static boolean isFileInRange(HoodieArchivedTimeline.TimeRangeFilter 
filter, String fileName) {
-    String minInstant = getMinInstantTime(fileName);
-    String maxInstant = getMaxInstantTime(fileName);
-    return filter.isInRange(minInstant) || filter.isInRange(maxInstant);
+    HoodieArchivedTimeline.TimeRangeFilter dataFileRange = new 
HoodieArchivedTimeline.ClosedClosedTimeRangeFilter(
+        getMinInstantTime(fileName), getMaxInstantTime(fileName));
+    return filter.intersects(dataFileRange);

Review Comment:
   Let's fixed the issue in a simple way here, and put the refactoring in a 
separate one if it is necessary.



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