alex-plekhanov commented on code in PR #10080:
URL: https://github.com/apache/ignite/pull/10080#discussion_r913470344
##########
modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/sorted/IndexRowCompartorImpl.java:
##########
@@ -81,15 +81,22 @@ private boolean sameType(IndexKey key, int idxType) {
}
/** */
- private int compare(IndexKey lkey, IndexKey rkey) {
- if (lkey == NullIndexKey.INSTANCE)
- return lkey.compare(rkey);
- else if (rkey == NullIndexKey.INSTANCE)
- return 1;
-
- if (lkey.type() == rkey.type())
- return lkey.compare(rkey);
+ private int compare(IndexKey lkey, IndexKey rkey) throws
IgniteCheckedException {
+ try {
+ if (lkey == NullIndexKey.INSTANCE)
+ return lkey.compare(rkey);
+ else if (rkey == NullIndexKey.INSTANCE)
+ return 1;
+
+ if (lkey.isComparableTo(rkey))
+ return lkey.compare(rkey);
+ else if (rkey.isComparableTo(lkey))
+ return -rkey.compare(lkey);
+ }
+ catch (RuntimeException e) {
Review Comment:
There is exception handling logic up in the stack, where runtime exceptions
trigger failure handler, so checked exception required here.
--
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]