CTTY commented on code in PR #11947:
URL: https://github.com/apache/hudi/pull/11947#discussion_r1797780048
##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/CompletionTimeQueryView.java:
##########
@@ -223,6 +224,25 @@ public List<String> getStartTimes(
InstantRange.RangeType.CLOSED_CLOSED, earliestInstantTimeFunc);
}
+ /**
+ * Queries the instant start time with given completion time range.
+ *
+ * @param rangeStart The query range start completion time.
+ * @param rangeEnd The query range end completion time.
+ * @param rangeType The range type.
+ * with the minimum completion time.
+ *
+ * @return The sorted instant time list.
+ */
+ @VisibleForTesting
+ public List<String> getStartTimes(
+ String rangeStart,
+ String rangeEnd,
+ RangeType rangeType) {
+ return
getStartTimes(metaClient.getCommitsTimeline().filterCompletedInstants(),
Option.ofNullable(rangeStart), Option.ofNullable(rangeEnd),
+ rangeType, s -> HoodieInstantTimeGenerator.instantTimeMinusMillis(s,
MILLI_SECONDS_IN_ONE_DAY));
Review Comment:
Good idea, I'll convert this to a static `Function`
--
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]