sanpwc commented on a change in pull request #121:
URL: https://github.com/apache/ignite-3/pull/121#discussion_r634126472



##########
File path: 
modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/watch/KeyCriterion.java
##########
@@ -118,45 +222,113 @@ public CollectionCriterion(Collection<Key> keys) {
         }
 
         /** {@inheritDoc} */
-        @Override public IgniteBiTuple<Key, Key> toRange() {
-            return new IgniteBiTuple<>(Collections.min(keys), 
Collections.max(keys));
+        @Override public boolean contains(Key key) {
+            return keys.contains(key);
         }
 
         /** {@inheritDoc} */
-        @Override public boolean contains(Key key) {
-            return keys.contains(key);
+        @Override protected Optional<KeyCriterion> doUnion(KeyCriterion 
keyCriterion) {
+            var newKeys = new ArrayList<>(keys);

Review comment:
       Hmm, why not to use Set? Am i right that in current solution it's 
possible to duplicate keys?




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


Reply via email to