zanmato1984 opened a new pull request, #55169: URL: https://github.com/apache/arrow/pull/55169
### Rationale for this change `inverse_permutation` and `scatter` currently accept only signed integer indices, requiring unnecessary casts for unsigned arrays. This PR adds unsigned support while reducing generated code size. ### What changes are included in this PR? - Accept signed and unsigned integer indices in both functions. - Allow unsigned inverse-permutation output types, with the default still following the input type. - Share input handling by bit width and validity generation by output width, while retaining specialized output writes. - Reduce the swizzle object's code section from 432,480 to 185,204 bytes (about 57.2% smaller, Apple Clang/O2). - Preserve signed-index checks and uint64 bounds diagnostics, and update the C++ and Python-facing documentation. ### Are these changes tested? Added unit tests for unsigned types, index bounds, sliced/chunked inputs, and validity bitmap boundaries. ### Are there any user-facing changes? Unsigned integer indices are now accepted. For example, inverse permutation of uint8 `[2, null, 0, 1]` returns uint8 `[2, 3, 0, null]`. No breaking API changes. ### Was AI used for this PR? The changes were thoroughly reviewed by a human with AI assistance. **PR code and description written by:** - [ ] Human - [x] AI **Reviewed before submission by:** - [x] Human - [x] AI - [ ] Not reviewed -- 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]
