-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-48457: [Python] Overflow check in datetime conversion in pa.array #48458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
|
7d3650e to
bad62b6
Compare
bad62b6 to
8382c5c
Compare
EnricoMi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @HyukjinKwon, welcome to the Apache Arrow project.
This looks generally good, one possible overflow remark, though.
EnricoMi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy with this. Just a minor suggestion to rename the method to reflect the "limitation" or "assumption".
|
I believe this should be ready for a look too @AlenkaF 🫡 |
Rationale for this change
arrow/python/pyarrow/src/arrow/python/numpy_to_arrow.cc
Lines 499 to 500 in 7a36fcc
Should check and work together with
safeparamter.What changes are included in this PR?
This PR proposes to implement overflow check in date and integer conversions
Are these changes tested?
Yes, manually tested, and also added a unittest:
Are there any user-facing changes?
Yes.
Before:
After: