sashapolo commented on code in PR #1424:
URL: https://github.com/apache/ignite-3/pull/1424#discussion_r1046767594


##########
modules/storage-rocksdb/src/main/java/org/apache/ignite/internal/storage/rocksdb/index/RocksDbSortedIndexStorage.java:
##########
@@ -202,14 +208,47 @@ public ByteBuffer next() {
 
                 this.hasNext = null;
 
-                return ByteBuffer.wrap(key).order(ORDER);
+                return mapper.apply(ByteBuffer.wrap(key).order(ORDER));
+            }
+
+            @Override
+            public @Nullable T peek() {
+                if (hasNext != null && !hasNext) {
+                    return null;
+                }
+
+                T next = null;

Review Comment:
   Because you can write this code without it (it's just a nitpick, no big 
deal):
   ```
   if (!it.isValid()) {
       RocksUtils.checkIterator(it);
   
       return null;
   } else {
       return mapper.apply(ByteBuffer.wrap(it.key()).order(ORDER));
   }
   ```



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