zstan commented on code in PR #6593:
URL: https://github.com/apache/ignite-3/pull/6593#discussion_r2373062918


##########
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/util/EmptyCacheFactory.java:
##########
@@ -83,6 +85,16 @@ public V compute(K key, BiFunction<? super K, ? super V, ? 
extends V> remappingF
             return remappingFunction.apply(key, null);
         }
 
+        @Override
+        public @Nullable V computeIfPresent(K key, BiFunction<? super K, ? 
super V, ? extends V> remappingFunction) {
+            return remappingFunction.apply(key, null);

Review Comment:
   got, it



##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/util/cache/Cache.java:
##########
@@ -73,6 +75,22 @@ public interface Cache<K, V> {
      */
     V compute(K key, BiFunction<? super K, ? super V, ? extends V> 
remappingFunction);
 
+    /**
+     * If the value for the specified key is present and non-null, attempts to 
compute a new mapping
+     * given the key and its current mapped value.
+     * If the remapping function returns null, the mapping is removed.
+     * If the remapping function itself throws an (unchecked) exception, the 
exception is rethrown,
+     * and the current mapping is left unchanged.
+     *
+     * @param key Key with which the specified value is to be associated.
+     * @param remappingFunction The remapping function to compute a value.
+     * @return The new value associated with the specified key, or null if 
none.
+     */
+    @Nullable V computeIfPresent(K key, BiFunction<? super K, ? super V, ? 
extends V> remappingFunction);
+
+    /** Returns a {@link Set} view of the mappings contained in this map. */

Review Comment:
   done



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