Skip to content

Conversation

@seisman
Copy link
Member

@seisman seisman commented Oct 15, 2024

See #2841 for context. In that PR, we check if there are integer overflow issues by checking if the absolute maximum of a column is greater than 2^31-1 = 2147483647, which is not 100% correct.

For int32 dtype, the allowed min/max values are:

In [1]: import numpy as np

In [2]: np.iinfo(np.int32)
Out[2]: iinfo(min=-2147483648, max=2147483647, dtype=int32)

Instead, we should check if the max value > 2147483647 or the min value < -2147483648.

This PR improve the way for checking integer overflow.

Supersede PR #2841.

@seisman seisman added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog needs review This PR has higher priority and needs review. labels Oct 15, 2024
@seisman seisman added this to the 0.14.0 milestone Oct 15, 2024
@seisman seisman added final review call This PR requires final review and approval from a second reviewer and removed needs review This PR has higher priority and needs review. labels Oct 15, 2024
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Oct 16, 2024
@seisman seisman merged commit 4f1238e into main Oct 16, 2024
@seisman seisman deleted the int32-overflow branch October 16, 2024 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants