adiranjan25 commented on issue #19023:
URL: https://github.com/apache/iceberg/issues/19023#issuecomment-7021918839

   I reproduced the truncation overflow on the current main branch using width 
10.
   
   - `truncateInt(10, Integer.MIN_VALUE)` returns `2147483646`.
   - `truncateLong(10, Long.MIN_VALUE)` returns `9223372036854775806`.
   
   Both results wrap to large positive values because the mathematical 
truncated values are outside the representable ranges.
   
   I've added a failing regression test and am investigating the appropriate 
overflow handling. Would the maintainers prefer explicit rejection of 
unrepresentable results, or is there an established compatibility requirement 
for these boundary values?
   
   I'd be happy to prepare a focused PR based on the preferred approach.


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