alex-plekhanov commented on code in PR #10080:
URL: https://github.com/apache/ignite/pull/10080#discussion_r913466968


##########
modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/sorted/inline/types/BooleanInlineIndexKeyType.java:
##########
@@ -46,10 +48,15 @@ public BooleanInlineIndexKeyType() {
     }
 
     /** {@inheritDoc} */
-    @Override public int compare0(long pageAddr, int off, BooleanIndexKey key) 
{
+    @Override public boolean isComparableTo(IndexKey key) {
+        return key instanceof NumericIndexKey;
+    }
+
+    /** {@inheritDoc} */
+    @Override public int compare0(long pageAddr, int off, IndexKey key) {
         boolean bool1 = PageUtils.getByte(pageAddr, off + 1) != 0;
 
-        return Integer.signum(Boolean.compare(bool1, (boolean)key.key()));
+        return -((NumericIndexKey)key).compareTo(bool1);

Review Comment:
   But `ObjectHashInlineIndexKeyType` is not a `NumericIndexKey`. All 
`NumericIndexKey`'s return -1, 0 or 1, so `Integer.signum()` is not required



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