vldpyatkov commented on code in PR #5686:
URL: https://github.com/apache/ignite-3/pull/5686#discussion_r2073055516


##########
modules/schema/src/main/java/org/apache/ignite/internal/schema/PartialBinaryTupleComparator.java:
##########
@@ -102,10 +102,8 @@ public int compare(ByteBuffer buffer1, ByteBuffer buffer2) 
{
         // We use the EQUALITY FLAG to determine the outcome of the comparison 
operation: if the flag is set, the prefix is considered
         // larger than the tuple and if the flag is not set, the prefix is 
considered smaller than the tuple. This is needed to include
         // or exclude the scan bounds.
-        if (isBuffer1Prefix == isBuffer2Prefix) {
+        if (!isBuffer2Prefix) {
             return 0;
-        } else if (isBuffer1Prefix) {
-            return equalityFlag(buffer1);
         } else {

Review Comment:
   I simplified this code based on the knowledge:
   ```
   if (isBuffer1Prefix == isBuffer2Prefix) {
               return 0;
           } else if (isBuffer1Prefix) {
               return equalityFlag(buffer1);
           } else {
               return -equalityFlag(buffer2);
           }
   ```



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to