asdf2014 commented on a change in pull request #8380: Suppress 
index-out-of-bounds warning from LGTM about loop unrolling
URL: https://github.com/apache/incubator-druid/pull/8380#discussion_r317040314
 
 

 ##########
 File path: 
processing/src/main/java/org/apache/druid/query/topn/TopNNumericResultBuilder.java
 ##########
 @@ -150,13 +150,13 @@ public TopNNumericResultBuilder addEntry(
     }
     for (int i = extra; i < metricVals.length; i += LOOP_UNROLL_COUNT) {
       metricValues.put(aggFactoryNames[i + 0], metricVals[i + 0]);
-      metricValues.put(aggFactoryNames[i + 1], metricVals[i + 1]);
-      metricValues.put(aggFactoryNames[i + 2], metricVals[i + 2]);
-      metricValues.put(aggFactoryNames[i + 3], metricVals[i + 3]);
-      metricValues.put(aggFactoryNames[i + 4], metricVals[i + 4]);
-      metricValues.put(aggFactoryNames[i + 5], metricVals[i + 5]);
-      metricValues.put(aggFactoryNames[i + 6], metricVals[i + 6]);
-      metricValues.put(aggFactoryNames[i + 7], metricVals[i + 7]);
+      metricValues.put(aggFactoryNames[i + 1], metricVals[i + 1]); // 
lgtm[java/index-out-of-bounds]
 
 Review comment:
   Yep, it's better. Thanks a lot.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to