xiangfu0 commented on a change in pull request #8366: URL: https://github.com/apache/pinot/pull/8366#discussion_r831519125
########## File path: pinot-broker/src/main/java/org/apache/pinot/broker/routing/segmentpruner/TimeSegmentPruner.java ########## @@ -478,6 +486,21 @@ public synchronized void refreshSegment(String segment) { return res; } + private List<Interval> getComplementSortedIntervals(List<Interval> intervals) { + List<Interval> res = new ArrayList<>(); + long startTime = MIN_START_TIME; + for (Interval interval : intervals) { + if (interval._min > startTime) { Review comment: Is this logic correct? E.g. what if you have 3 intervals: [2, 10] ,[5,15], [13, 20] the intervals are [0, 1], [11, 12], [21, MAX_END_TIME], but should just be [0,1], [21, MAX_END_TIME] ? Also you can skip the interval if `startTime = interval._min - 1` -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org