jainankitk commented on code in PR #14439:
URL: https://github.com/apache/lucene/pull/14439#discussion_r2050115412


##########
lucene/core/src/java/org/apache/lucene/util/ArrayUtil.java:
##########
@@ -801,4 +802,16 @@ public static int compareUnsigned4(byte[] a, int aOffset, 
byte[] b, int bOffset)
     return Integer.compareUnsigned(
         (int) BitUtil.VH_BE_INT.get(a, aOffset), (int) 
BitUtil.VH_BE_INT.get(b, bOffset));
   }
+
+  public static Function<byte[], Long> getValue(int numBytes) {

Review Comment:
   Thanks for suggesting `NumericUtils`. I wasn't aware of the 
`NumericUtils#sortableBytesToLong`, exactly what I needed to flip the sign bit 
correctly!
   
   ```
   // Flip the sign bit back
       v ^= 0x8000000000000000L;
   ```
   
   I have removed this method from `ArrayUtil` and added in 
`PointTreeBulkCollector`. Please let me know if you still see any concerns



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