TheR1sing3un commented on code in PR #14366:
URL: https://github.com/apache/hudi/pull/14366#discussion_r2567184421
##########
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.
I agree, I will bring up a pr again for a simple fix.
This pr is used for refactoring.
Currently, there are many ambiguities in the naming, code structure, and
usage of `TimeRangeFilter` and `InstantComparasion`. I still hope to refactor
the logic of this part. You can freely accept this refactoring. Of course, if
you think it's not necessary, we can also pend or close the refactoring~ Thanks
for your review!
--
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]