ascherbakoff commented on a change in pull request #400:
URL: https://github.com/apache/ignite-3/pull/400#discussion_r749101351



##########
File path: 
modules/table/src/main/java/org/apache/ignite/internal/table/RecordBinaryViewImpl.java
##########
@@ -91,15 +91,7 @@ public RecordBinaryViewImpl(InternalTable tbl, 
SchemaRegistry schemaReg, TableMa
     @Override public @NotNull CompletableFuture<Collection<Tuple>> 
getAllAsync(@NotNull Collection<Tuple> keyRecs) {
         Objects.requireNonNull(keyRecs);
 
-        HashSet<BinaryRow> keys = new HashSet<>(keyRecs.size());
-
-        for (Tuple keyRec : keyRecs) {
-            final Row keyRow = marshaller().marshalKey(keyRec);
-
-            keys.add(keyRow);
-        }
-
-        return tbl.getAll(keys, tx).thenApply(this::wrap);
+        return 
tbl.getAll(keyRecs.stream().map(marsh::marshalKey).collect(toList()), 
tx).thenApply(this::wrap);

Review comment:
       toList is used intentionally, because the semantics of the method was 
changed. Now it can contain nulls if a value for a key doesn't exists




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