rok commented on a change in pull request #10960:
URL: https://github.com/apache/arrow/pull/10960#discussion_r710161468
##########
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:
Difference between two moments is just an interval without a timezone.
And out timezone aware timestamps are unambiguous moments or am I getting
something terribly wrong here? :)
--
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]