rok commented on a change in pull request #10610:
URL: https://github.com/apache/arrow/pull/10610#discussion_r694110590
##########
File path: cpp/src/arrow/compute/kernels/scalar_temporal.cc
##########
@@ -161,6 +162,22 @@ struct TemporalComponentExtract
}
};
+template <template <typename...> class Op, typename Duration, typename OutType>
+struct TemporalLocalization
+ : public TemporalComponentExtractBase<Op, Duration, OutType> {
+ using Base = TemporalComponentExtractBase<Op, Duration, OutType>;
+
+ static Status Exec(KernelContext* ctx, const ExecBatch& batch, Datum* out) {
+ const TemporalLocalizationOptions& options =
TemporalLocalizationState::Get(ctx);
+ const auto& timezone = GetInputTimezone(batch.values[0]);
+ if (!timezone.empty() && options.timezone != timezone) {
+ return Status::Invalid("Input and output timezones do not match: ",
timezone,
Review comment:
Yeah, that's a good point! I made this so that input timestamp array has
to be timezone-less.
--
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]