ibessonov commented on code in PR #2021:
URL: https://github.com/apache/ignite-3/pull/2021#discussion_r1184809717
##########
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:
Wait a minute, it uses a collection, not iterator.
I used anonymous class because it's small. It's the same approach that's
used in
`org.apache.ignite.internal.storage.index.impl.AbstractTestIndexStorage#get`,
for example, do you have issues with that code?
--
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]