pitrou commented on code in PR #12528:
URL: https://github.com/apache/arrow/pull/12528#discussion_r871455170
##########
cpp/src/arrow/compute/kernels/scalar_temporal_test.cc:
##########
@@ -2611,6 +2611,260 @@ TEST_F(ScalarTemporalTest, TestRoundTemporal) {
CheckScalarUnary(op, unit, times, unit, round_15_years, &round_to_15_years);
}
+TEST_F(ScalarTemporalTest, TestCeilFloorRoundTemporalAmbiguous1) {
+ // Asia/Tehran switches from UTC+4:30 to UTC+3:30 on 2022-09-22 00:00:00
UTC+4:30.
+ // This causes an hour long ambiguous period in local time.
+ auto unit = timestamp(TimeUnit::MILLI, "Asia/Tehran");
+ auto options = RoundTemporalOptions(25, CalendarUnit::MINUTE);
+ const char* times = R"([
+ "2022-09-21 18:09:00", "2022-09-21 18:10:00", "2022-09-21 18:11:00",
+ "2022-09-21 18:19:00", "2022-09-21 18:20:00", "2022-09-21 18:21:00",
+ "2022-09-21 18:44:00", "2022-09-21 18:45:00", "2022-09-21 18:46:00",
+ "2022-09-21 19:09:00", "2022-09-21 19:10:00", "2022-09-21 19:11:00",
+ "2022-09-21 19:24:00", "2022-09-21 19:25:00", "2022-09-21 19:26:00",
+ "2022-09-21 19:34:00", "2022-09-21 19:35:00", "2022-09-21 19:36:00",
+ "2022-09-21 19:59:00", "2022-09-21 20:00:00", "2022-09-21 20:01:00",
+ "2022-09-21 20:24:00", "2022-09-21 20:25:00", "2022-09-21 20:26:00",
+ "2022-09-21 20:49:00", "2022-09-21 20:50:00", "2022-09-21 20:51:00"])";
+ const char* times_ceil = R"([
+ "2022-09-21 18:10:00", "2022-09-21 18:10:00", "2022-09-21 18:20:00",
Review Comment:
So, if I take `18:10`, it translates to `22:40` in local time, which is not
a multiple of 25 minutes... am I misunderstanding something?
--
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]