AMashenkov commented on a change in pull request #9423:
URL: https://github.com/apache/ignite/pull/9423#discussion_r711967314



##########
File path: 
modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsInMemoryStoreImpl.java
##########
@@ -203,11 +239,43 @@ public 
IgniteStatisticsInMemoryStoreImpl(Function<Class<?>, IgniteLogger> logSup
         Collection<ObjectPartitionStatisticsImpl> statistics
     ) {
         IntMap<ObjectPartitionStatisticsImpl> statisticsMap = new 
IntHashMap<ObjectPartitionStatisticsImpl>();
+
         for (ObjectPartitionStatisticsImpl s : statistics) {
             if (statisticsMap.put(s.partId(), s) != null)
                 log.warning(String.format("Trying to save more than one %s.%s 
partition statistics for partition %d",
                     key.schema(), key.obj(), s.partId()));
         }
+
         return statisticsMap;
     }
+
+    /** {@inheritDoc} */
+    @Override public Collection<Integer> loadObsolescenceMap(StatisticsKey 
key) {
+        Collection<Integer> res[] = new Collection[1];
+        res[0] = new ArrayList<>();
+
+        obsStats.computeIfPresent(key, (k, v) -> {
+            for (Integer partId : v.keys())
+                res[0].add(partId);
+
+            return v;
+        });
+
+        return res[0];
+    }
+
+    /** {@inheritDoc} */
+    @Override public Collection<Integer> loadLocalPartitionMap(StatisticsKey 
key) {
+        Collection<Integer> res[] = new Collection[1];
+        res[0] = new ArrayList<>();

Review comment:
       Redundant collection.




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to