Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] to_utc_timestamp and from_utc_timestamp fallback when TZ is supported time zone #10222

Closed
res-life opened this issue Jan 19, 2024 · 1 comment · Fixed by #10223
Closed
Assignees
Labels
bug Something isn't working

Comments

@res-life
Copy link
Collaborator

Describe the bug
to_utc_timestamp and from_utc_timestamp fallback when TZ is supported time zone

Steps/Code to reproduce bug
export TZ = Asia/Shanghai
select:

  • from_utc_timestamp(ts_col, tz)
  • to_utc_timestamp(ts_col, tz)
    Reports: Set both of the timezones to UTC to enable class org.apache.spark.sql.catalyst.expressions
 !Expression <FromUTCTimestamp> from_utc_timestamp(structF#15.timestampF, Asia/Shanghai) cannot run on GPU because class org.apache.spark.sql.catalyst.expressions.FromUTCTimestamp is not supported with timezone settings: (JVM: Asia/Shanghai, session: Asia/Shanghai). Set both of the timezones to UTC to enable class org.apache.spark.sql.catalyst.expressions.
@res-life res-life added bug Something isn't working ? - Needs Triage Need team to review and classify labels Jan 19, 2024
@res-life res-life self-assigned this Jan 19, 2024
@res-life
Copy link
Collaborator Author

to_utc_timestamp and from_utc_timestamp are not time zone aware. It means they are not related to session time zone.
They both take a timezone parameter, usage:

  • from_utc_timestamp(ts_col, tz)
  • to_utc_timestamp(ts_col, tz)
    So should not check the session time zone, only check time zone in the parameter is enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants