Repository navigation
GH-46872: [C++][Python] Move Arange utility function to an Arrow C++ - #48710
EslamAhmed171 wants to merge 5 commits into
Conversation
|
Looks good, is there a need for handling pathological cases like skip == INT64_MIN and overflowing sizes here? |
|
Thanks for working on this @EslamAhmed171 ! |
Sorry for the late response, and thank you both for your reviews! |
|
@rok Friendly ping! |
|
@EslamAhmed171 Sorry for the delayed review! Are you still interested in working on this PR? If so, could you please address the feedback above and rebase your branch against the latest |
4d911f8 to
6dbd59b
Compare
Thanks for the review! I revisited the implementation and found it had several false-positive rejections, ranges that are perfectly valid but were being rejected because intermediate computations overflowed In both branches the range is guaranteed to be in Rejection now happens only for Cases that were previously rejected but are now acceptedThe old code computed the range and size in
These are all covered by the new Happy to get another round of review if anything else needs tightening. |
Rationale for this change
Move the Arange utility function from Python-specific code to Arrow C++ core utilities.
What changes are included in this PR?
Relocate the Arange implementation from
arrow/python/util.{h,cc}to Arrow C++ utility files.Are these changes tested?
Yes, existing tests for
pa.arangecontinues to pass.Are there any user-facing changes?
No user-facing changes. This is an internal code refactoring that maintains the existing
pyarrow.arangeAPI.