rok commented on code in PR #12657:
URL: https://github.com/apache/arrow/pull/12657#discussion_r855271158


##########
cpp/src/arrow/compute/kernels/scalar_temporal_unary.cc:
##########
@@ -728,18 +798,31 @@ const Duration FloorTimePoint(const int64_t arg, const 
int64_t multiple,
 }
 
 template <typename Duration, typename Localizer>
-const Duration FloorWeekTimePoint(const int64_t arg, const int64_t multiple,
+const Duration FloorWeekTimePoint(const int64_t arg, const 
RoundTemporalOptions options,
                                   Localizer localizer_, const Duration 
weekday_offset,
                                   Status* st) {
   const auto t = localizer_.template ConvertTimePoint<Duration>(arg) + 
weekday_offset;
   const weeks d = floor<weeks>(t).time_since_epoch();
 
-  if (multiple == 1) {
+  if (options.multiple == 1) {
     return localizer_.template 
ConvertLocalToSys<Duration>(duration_cast<Duration>(d),
                                                            st) -
            weekday_offset;
+  } else if (options.calendar_based_origin) {
+    weekday wd_;

Review Comment:
   Sorry, I added it to another location as this check happens in 
`GetFlooredYmd`, `FloorTimePoint` and `FloorWeekTimePoint`. I added it to all 
the relevant locations now.



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