tkalkirill commented on code in PR #2021:
URL: https://github.com/apache/ignite-3/pull/2021#discussion_r1184804188


##########
modules/storage-api/src/testFixtures/java/org/apache/ignite/internal/storage/index/impl/TestSortedIndexStorage.java:
##########
@@ -83,10 +79,19 @@ Iterator<RowId> 
getRowIdIteratorForGetByBinaryTuple(BinaryTuple key) {
         BinaryTuplePrefix higherBound = BinaryTuplePrefix.fromBinaryTuple(key);
 
         //noinspection resource
-        return scan(lowerBound, higherBound, GREATER_OR_EQUAL | LESS_OR_EQUAL)
-                .stream()
-                .map(IndexRow::rowId)
-                .iterator();
+        PeekCursor<IndexRow> peekCursor = scan(lowerBound, higherBound, 
GREATER_OR_EQUAL | LESS_OR_EQUAL);
+
+        return new Iterator<>() {

Review Comment:
   Why an inner class and not a method or a separate class.
   You can use for example 
`org.apache.ignite.internal.util.CollectionUtils#viewReadOnly(java.util.Collection<?
 extends T1>, java.util.function.Function<? super T1,? extends T2>)`.



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