You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kylin.apache.org by GitBox <gi...@apache.org> on 2018/09/26 10:55:07 UTC

[GitHub] shaofengshi commented on a change in pull request #252: KYLIN-3580 Avoid using entrySet to add elements

shaofengshi commented on a change in pull request #252: KYLIN-3580 Avoid using entrySet to add elements
URL: https://github.com/apache/kylin/pull/252#discussion_r220143396
 
 

 ##########
 File path: core-cube/src/main/java/org/apache/kylin/cube/cuboid/algorithm/CuboidStatsUtil.java
 ##########
 @@ -87,7 +88,11 @@ public int compare(Map.Entry<Long, Long> o1, Map.Entry<Long, Long> o2) {
                         return o1.getValue().compareTo(o2.getValue());
                     }
                 });
-        sortedStatsSet.addAll(statistics.entrySet());
+        //sortedStatsSet.addAll(statistics.entrySet()); KYLIN-3580
+        Iterator<Map.Entry<Long, Long>> entryIterator = statistics.entrySet().iterator();
 
 Review comment:
   Please use "for ( element : a set) " expression, that is more clear than this.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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