You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/05/23 18:57:56 UTC
[GitHub] [incubator-druid] gianm commented on a change in pull request
#7738: Fix some problems reported by PVS-Studio
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org