Anurag-S1ngh commented on PR #18112:
URL: https://github.com/apache/iceberg/pull/18112#issuecomment-7320804524

   Proposed wording for the truncate section:
   
   ```
   r = floorMod(v, W)
   truncate_W(v) = v - r
   ```
   
   with both operations computed using unbounded integer arithmetic, so the 
result does not depend on fixed-width intermediate overflow. Note 1 can then 
drop the `((v % W) + W) % W` workaround.
   
   That still leaves the final value case: for `int` and `long`, `v - r` can 
fall outside the result type, for example `truncate(10, Integer.MIN_VALUE)`. 
The spec would also need to state the expected result there, since the current 
wrap breaks ordering.
   


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