somandal commented on code in PR #9333: URL: https://github.com/apache/pinot/pull/9333#discussion_r972385553
########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/converter/stats/MutableColumnStatistics.java: ########## @@ -145,6 +146,8 @@ public boolean isSorted() { // Iterate over all data to figure out whether or not it's in sorted order MutableForwardIndex mutableForwardIndex = (MutableForwardIndex) _dataSource.getForwardIndex(); + Preconditions.checkState(mutableForwardIndex != null, Review Comment: Thanks for the review! I've done that on purpose. Where I throw `UnsupportedOperationException` are places where the forward index is allowed to be null due to disabling it. The exception is just trying to indicate that the query isn't supported. On the other hand, we don't allow disabling the forward index for `Mutable` segments at the moment. So I added the `Precondition` more as an assert that the forward index absolutely should exist otherwise it means something is very wrong. Let me know if you still think these should be unified or if the above reasoning seems alright. -- 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