Jackie-Jiang commented on a change in pull request #8366:
URL: https://github.com/apache/pinot/pull/8366#discussion_r831568338



##########
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:
       The intervals passed in has no overlapping (guaranteed by AND and OR 
handling). Will add some javadoc explaining that.
   We cannot skip the interval because start does not include the previous 
`max`, e.g. `[1, 2], [4, 5]` -> `[0, 0], [3, 3], [6, MAX]`




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

Reply via email to