You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jorisvandenbossche (via GitHub)" <gi...@apache.org> on 2023/05/17 15:26:06 UTC

[GitHub] [arrow] jorisvandenbossche commented on a diff in pull request #35634: GH-35633: [C++] R builds failing with error 'Invalid: Timestamps already have a timezone: 'UTC'. Cannot localize to 'UTC''

jorisvandenbossche commented on code in PR #35634:
URL: https://github.com/apache/arrow/pull/35634#discussion_r1196702982


##########
cpp/src/arrow/compute/kernels/scalar_temporal_unary.cc:
##########
@@ -120,7 +120,7 @@ struct AssumeTimezoneExtractor
   static Status Exec(KernelContext* ctx, const ExecSpan& batch, ExecResult* out) {
     const AssumeTimezoneOptions& options = AssumeTimezoneState::Get(ctx);
     const auto& timezone = GetInputTimezone(*batch[0].type());
-    if (!timezone.empty()) {
+    if (!timezone.empty() && timezone != options.timezone) {

Review Comment:
   This should be reverted back I think (it shouldn't be needed to fix the failures, and I _think_ it's better to keep the "assume_timezone" kernel strict about input being tz-naive)



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org