lidavidm commented on a change in pull request #10960:
URL: https://github.com/apache/arrow/pull/10960#discussion_r710189359
##########
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:
Ok, sounds good, sorry for the confusion. I realized I forgot to update
the docs, I'll try to add some explanatory text there as well since this is a
little confusing.
--
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]