easyice commented on PR #13376:
URL: https://github.com/apache/lucene/pull/13376#issuecomment-2115450214

   The essence of this issue is how to deal with the integer value with the 
sign bit as 1 (like this integer overflow case). We have two options. 
   * The first is pass a negative long value to `writeGroupVInts`, and also 
return a negative value in `readGroupVInt`. Previously, we didn't consider 
encoding a negative value in group-varint. Currently, `readGroupVInt` may 
return a positive or negative value in different implementations. 
   * The second approach is only pass positive numbers to `writeGroupVInts` / 
`readGroupVInt`, and replace `Math.toIntExact` with `(int)`.
   
   The first approach feels more reasonable.
   


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