gf2121 commented on code in PR #13246:
URL: https://github.com/apache/lucene/pull/13246#discussion_r1544668141


##########
lucene/core/src/java/org/apache/lucene/search/comparators/NumericComparator.java:
##########
@@ -85,6 +83,16 @@ public void disableSkipping() {
     pruning = Pruning.NONE;
   }
 
+  protected abstract long missingValueAsComparableLong();
+
+  private static long sortableBytesAsLong(byte[] bytes) {
+    return switch (bytes.length) {
+      case 4 -> NumericUtils.sortableBytesToInt(bytes, 0);
+      case 8 -> NumericUtils.sortableBytesToLong(bytes, 0);
+      default -> throw new IllegalStateException("bytes count should be 4 or 
8");
+    };
+  }

Review Comment:
   Good catch! There is no restriction on how numbers encoded as point values 
so i make this method abstract and delegate it to implementations.



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

Reply via email to