gianm commented on a change in pull request #7738: Fix some problems reported 
by PVS-Studio
URL: https://github.com/apache/incubator-druid/pull/7738#discussion_r287071863
 
 

 ##########
 File path: 
extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogram.java
 ##########
 @@ -419,7 +419,7 @@ protected void mergeInsert(final int mergeAt, int 
insertAt, final float v, final
       // use unused slot to shift array left or right and make space for the 
new bin to insert
       if (insertAt < unusedIndex) {
         shiftRight(insertAt, unusedIndex);
-      } else if (insertAt >= unusedIndex) {
+      } else { // insertAt >= unusedIndex
 
 Review comment:
   How about turning this into an `assert` instead of a comment (or just delete 
it, it's pretty obvious just from reading the code).

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to