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


##########
modules/storage-api/src/testFixtures/java/org/apache/ignite/internal/storage/index/impl/TestSortedIndexStorage.java:
##########
@@ -61,8 +54,21 @@ public class TestSortedIndexStorage extends 
AbstractTestIndexStorage implements
     public TestSortedIndexStorage(int partitionId, SortedIndexDescriptor 
descriptor) {
         super(partitionId);
 
+        BinaryTupleComparator binaryTupleComparator = new 
BinaryTupleComparator(descriptor);
+
         this.descriptor = descriptor;
-        this.index = new ConcurrentSkipListMap<>(new 
BinaryTupleComparator(descriptor));
+        this.index = new ConcurrentSkipListSet<>((indexRow0, indexRow1) -> {
+            int cmp = binaryTupleComparator.compare(

Review Comment:
   Can be written shorter:
   ```
   Comparator<IndexRow> comparator = Comparator.comparing((IndexRow row) -> 
row.indexColumns().byteBuffer(), binaryTupleComparator)
           .thenComparing(IndexRow::rowId);
   ```
           



##########
modules/storage-api/src/testFixtures/java/org/apache/ignite/internal/storage/index/impl/AbstractTestIndexStorage.java:
##########
@@ -30,6 +30,8 @@
  * Test-only abstract index storage class.
  */
 abstract class AbstractTestIndexStorage implements IndexStorage {
+    protected final int partitionId;

Review Comment:
   This field is only used in `TestSortedIndexStorage` maybe it should be moved 
there



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