snigdhachoppac opened a new pull request, #50675:
URL: https://github.com/apache/arrow/pull/50675

   ### Rationale for this change
   
   The `ceil_temporal`, `floor_temporal`, and `round_temporal` functions 
currently support date, time, and timestamp inputs, but not duration inputs.
   
   ### What changes are included in this PR?
   
   - Add kernel registration for duration values with second, millisecond, 
microsecond, and nanosecond resolutions
   - Support rounding duration inputs using physical units through day
   - Treat week as seven physical days for duration inputs
   - Reject ambiguous calendar units such as month, quarter, and year
   - Reject `calendar_based_origin` for duration inputs
   - Add focused C++ tests covering all four duration resolutions, positive and 
negative values, null propagation, day and week rounding, and unsupported 
calendar behavior
   
   ### Are these changes tested?
   
   Yes.
   
   - `arrow-compute-scalar-temporal-test`: 55 tests passed
   - Applicable pre-commit C++ formatting and lint checks passed
   
   ### Are there any user-facing changes?
   
   Yes. Users can now pass duration values to `ceil_temporal`, 
`floor_temporal`, and `round_temporal` for supported physical units.
   
   ### AI assistance
   
   I used ChatGPT to help navigate the codebase and draft the initial 
implementation. I reviewed, revised, and tested the changes locally.


-- 
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]

Reply via email to