zanmato1984 commented on code in PR #39267:
URL: https://github.com/apache/arrow/pull/39267#discussion_r1429580148


##########
cpp/src/arrow/compute/kernels/scalar_temporal_unary.cc:
##########
@@ -255,6 +255,17 @@ struct Day {
   Localizer localizer_;
 };
 
+template <typename Duration, typename Localizer>
+struct Day<Duration, Localizer, DurationType> {

Review Comment:
   This specialization is necessary because extracting day from duration is 
different than from timestamp/date: `day(date/timestamp)` returns the "day" 
component which is in the range of [1, 31], whereas `day(duration)` returns the 
number of days represented in a specified amount of sec/ms/us/ns whose range is 
logically [int64_min, int64_max] depending on the unit.



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