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/03/04 20:48:40 UTC

[GitHub] [incubator-druid] leventov commented on a change in pull request #7067: Made IntelliJ Inspection "Iteration over keySet() could be replaced with entrySet()" a error & Fixed the violations

leventov commented on a change in pull request #7067: Made IntelliJ Inspection "Iteration over keySet() could be replaced with entrySet()" a error & Fixed the violations
URL: https://github.com/apache/incubator-druid/pull/7067#discussion_r262235987
 
 

 ##########
 File path: benchmarks/src/main/java/org/apache/druid/benchmark/query/SelectBenchmark.java
 ##########
 @@ -278,8 +278,9 @@ private SelectQuery incrementQueryPagination(SelectQuery query, SelectResultValu
     Map<String, Integer> pagingIdentifiers = prevResult.getPagingIdentifiers();
     Map<String, Integer> newPagingIdentifers = new HashMap<>();
 
-    for (String segmentId : pagingIdentifiers.keySet()) {
-      int newOffset = pagingIdentifiers.get(segmentId) + 1;
+    for (Map.Entry<String, Integer> entry : pagingIdentifiers.entrySet()) {
 
 Review comment:
   `pagingIdentifiers.replaceAll((id, offset) -> offset + 1);` should replace the whole loop, not be done on every iteration.
   
   @hpandeycodeit please read your code with fresh eye every time before committing.

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