Anurag-S1ngh commented on PR #19164: URL: https://github.com/apache/iceberg/pull/19164#issuecomment-7278933837
Separate. This is a different failure mode from #19075: the overflow is in `truncateInt` at `(value % width) + width`, which only triggers for widths above `2^30`. It needs a fix in the transform, not in the projection layer. I reproduced both cases: - `truncateInt(1073741825, 1073741823)` returns `2147483646` instead of `0` - `truncateInt(Integer.MAX_VALUE, 2)` returns `2` instead of `0` The long path is not affected, since the same expression stays inside long range for any int width. The fix also changes the partition value the writer stores for those widths, so existing partition values written with a width above `2^30` would stop matching. That is a separate compatibility decision, and this PR intentionally keeps the existing wrapped encoding for #19075. I'll file this as its own issue against `TruncateUtil.truncateInt`. Your test is a good reproduction, so post it there and keep this PR scoped to #19075. -- 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]
