rok opened a new pull request, #55963:
URL: https://github.com/apache/arrow/pull/55963
### Rationale for this change
`floor_temporal`, `ceil_temporal`, and `round_temporal` crash with division
by zero when `multiple=0` and produce invalid results when `multiple < 0`.
### What changes are included in this PR?
- Validate `multiple > 0` during kernel initialization for `floor_temporal`,
`ceil_temporal`, and `round_temporal`, returning `Status::Invalid("Rounding
multiple must be positive")` (matching `round_to_multiple`).
- Add C++ and Python test cases for `multiple <= 0`.
### Are these changes tested?
Yes, C++ and Python unit tests are added.
### Are there any user-facing changes?
`floor_temporal`, `ceil_temporal`, and `round_temporal` now return an
invalid status when `multiple <= 0`.
**This PR contains a "Critical Fix".** Fixes a division-by-zero crash for
`multiple=0` and incorrect output for `multiple < 0`.
### Was AI used for this PR?
**PR code and description written by:**
- [ ] Human
- [x] AI
**Reviewed before submission by:**
- [x] Human
- [ ] AI
- [ ] Not reviewed
* GitHub Issue: #55921
--
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]