GH-33459: [C++][Python] Support step >= 1 in list_slice kernel#48769
GH-33459: [C++][Python] Support step >= 1 in list_slice kernel#48769AlenkaF merged 1 commit intoapache:mainfrom
Conversation
90ae6a2 to
75fff9a
Compare
|
Gentle ping @AlenkaF . Do you mind taking a quick look whenever you find some time? I thought this is quite straightforward. |
rok
left a comment
There was a problem hiding this comment.
This would be nice to do, just some minor suggestions.
|
@github-actions crossbow submit -g python |
|
Revision: e69bb55 Submitted crossbow builds: ursacomputing/crossbow @ actions-74c64ef881 |
|
@HyukjinKwon can you rebase please? That should fix at least some of the build issues. |
|
Sure, will take a look today! |
|
I believe they are not related to this PR. They are mostly failing as: Let me file an issue and take a separate look. |
|
I think it relates to #48314 .. taking a look more .. |
|
ah it's simply my PR has to be rebased! |
|
@github-actions crossbow submit -g python |
|
Revision: af161ab Submitted crossbow builds: ursacomputing/crossbow @ actions-84c52d3411 |
|
Thanks! |
Rationale for this change
Closes ARROW-18281, which has been open since 2022. The
list_slicekernel currently rejectsstart == stop, but should return empty lists instead (following Python slicing semantics).The implementation already handles this case correctly. When ARROW-18282 added step support,
bit_util::CeilDiv(stop - start, step)naturally returns 0 forstart == stop, producing empty lists. The only issue was the validation check (start >= stop) that prevented this from working.What changes are included in this PR?
start >= stoptostart > stopAre these changes tested?
Yes, tests were added.
Are there any user-facing changes?
Yes.
Before:
After: