maedhroz commented on code in PR #2416:
URL: https://github.com/apache/cassandra/pull/2416#discussion_r1229939803
##########
src/java/org/apache/cassandra/index/sai/disk/v1/segment/Segment.java:
##########
@@ -87,14 +87,15 @@ public boolean intersects(AbstractBounds<PartitionPosition>
keyRange)
if (keyRange instanceof Range && ((Range<?>)keyRange).isWrapAround())
return keyRange.contains(minKeyBound) ||
keyRange.contains(maxKeyBound);
- int cmp = keyRange.right.getToken().compareTo(minKey);
+ int cmp = keyRange.right.compareTo(minKeyBound);
// if right is minimum, it means right is the max token and bigger
than maxKey.
// if right bound is less than minKey, no intersection
if (!keyRange.right.isMinimum() && (!keyRange.inclusiveRight() && cmp
== 0 || cmp < 0))
return false;
+ cmp = keyRange.left.compareTo(maxKeyBound);
// if left bound is bigger than maxKey, no intersection
Review Comment:
```suggestion
// if left bound is bigger than maxKeyBound, no intersection
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]