rok commented on a change in pull request #10960:
URL: https://github.com/apache/arrow/pull/10960#discussion_r710187468
##########
File path: cpp/src/arrow/compute/kernels/scalar_temporal.cc
##########
@@ -192,6 +195,60 @@ struct TemporalComponentExtract
}
};
+Status CheckTimezones(const ExecBatch& batch) {
+ const auto& timezone = GetInputTimezone(batch.values[0]);
+ for (int i = 1; i < batch.num_values(); i++) {
+ const auto& other_timezone = GetInputTimezone(batch.values[i]);
+ if (other_timezone != timezone) {
+ return Status::TypeError("Got differing time zone '", other_timezone,
+ "' for argument ", i + 1, "; expected '",
timezone, "'");
+ }
Review comment:
Riiight it's because you care about boundaries not the full periods :).
In that case you'd want to block this indeed and have user change one of the
two timestamps into the timezone they care about and run the operation 'there'.
--
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]