costin commented on PR #16896:
URL: https://github.com/apache/lucene/pull/16896#issuecomment-6475926658

   Thanks for looking into this.
   
   I've noticed the overflow check is per query rather than per field, so 
common open-ended ranges also lose the encoded path: ts <= x arrives as 
[Long.MIN_VALUE, x] and overflows whenever min > 0, and v >= x overflows 
whenever min < 0.
   How about gating on the encoding instead? 
   Stored values only go negative when bitsPerValue == 64 so keep the 
saturating helpers for narrower fields and use the decoded path only for 64-bit 
ones.
   
   Please also add open-bound queries and sparse sorted-numeric to the test.


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