xiangfu0 commented on a change in pull request #6824:
URL: https://github.com/apache/incubator-pinot/pull/6824#discussion_r619022171



##########
File path: 
pinot-broker/src/main/java/org/apache/pinot/broker/routing/segmentpruner/interval/Interval.java
##########
@@ -78,19 +74,17 @@ public int hashCode() {
     return result;
   }
 
+  @Nullable
   public static Interval getIntersection(Interval a, Interval b) {
-    Preconditions.checkNotNull(a, "Intersect invalid intervals {} and {}", a, 
b);
-    Preconditions.checkNotNull(b, "Intersect invalid intervals {} and {}", a, 
b);
     if (!a.intersects(b)) {
       return null;
     }
     return new Interval(Math.max(a._min, b._min), Math.min(a._max, b._max));
   }
 
+  @Nullable
   public static Interval getUnion(Interval a, Interval b) {
     // Can only merge two intervals if they overlap
-    Preconditions.checkNotNull(a, "Union invalid intervals {} and {}", a, b);
-    Preconditions.checkNotNull(b, "Union invalid intervals {} and {}", a, b);
     if (!a.intersects(b)) {

Review comment:
       same as above.




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

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