tkalkirill commented on code in PR #2021:
URL: https://github.com/apache/ignite-3/pull/2021#discussion_r1184816510
##########
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:
Exactly, nothing will stop us from doing a similar method but for iterators.
If this approach is used in `AbstractTestIndexStorage#get`, this does not
mean that it is good, I think you should not foul the code with an anonymous
class, but use a separate method / class.
--
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]