iverase commented on code in PR #14626:
URL: https://github.com/apache/lucene/pull/14626#discussion_r2103918228


##########
lucene/core/src/java/org/apache/lucene/search/PointRangeQuery.java:
##########
@@ -154,16 +154,18 @@ private Relation relate(byte[] minPackedValue, byte[] 
maxPackedValue) {
             return Relation.CELL_OUTSIDE_QUERY;
           }
 
-          crosses |=
-              comparator.compare(minPackedValue, offset, lowerPoint, offset) < 0
-                  || comparator.compare(maxPackedValue, offset, upperPoint, 
offset) > 0;
+          if (crosses == false) {

Review Comment:
   I would expect this comparision is not happening already. The current 
command is equivalent to:
   ```
   crosses = crosses || omparator.compare(minPackedValue, offset, lowerPoint, 
offset) < 0
                     || comparator.compare(maxPackedValue, offset, upperPoint, 
offset) > 0;
   ```
   Which should only be executed is crosses is false?
   



##########
lucene/core/src/java/org/apache/lucene/search/PointRangeQuery.java:
##########
@@ -154,16 +154,18 @@ private Relation relate(byte[] minPackedValue, byte[] 
maxPackedValue) {
             return Relation.CELL_OUTSIDE_QUERY;
           }
 
-          crosses |=
-              comparator.compare(minPackedValue, offset, lowerPoint, offset) < 0
-                  || comparator.compare(maxPackedValue, offset, upperPoint, 
offset) > 0;
+          if (crosses == false) {

Review Comment:
   I would expect this comparison is not happening already. The current command 
is equivalent to:
   ```
   crosses = crosses || omparator.compare(minPackedValue, offset, lowerPoint, 
offset) < 0
                     || comparator.compare(maxPackedValue, offset, upperPoint, 
offset) > 0;
   ```
   Which should only be executed is crosses is false?
   



-- 
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: issues-unsubscr...@lucene.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to