Skip to content

Conversation

@ljfgem
Copy link
Collaborator

@ljfgem ljfgem commented Jan 9, 2024

What changes are proposed in this pull request, and why are they necessary?

In Hive, CURRENT_TIMESTAMP returns a UTC timestamp, whereas in Trino, it returns a timestamp based on the session's timezone. Therefore, to be compatible with Hive query result, AT TIME ZONE 'UTC' should be added to the translated Trino SQL. For example, SELECT CURRENT_TIMESTAMP is transformed into SELECT CAST(CURRENT_TIMESTAMP AT TIME ZONE 'UTC' AS TIMESTAMP(3)).

How was this patch tested?

Modified unit tests.

@wmoustafa
Copy link
Contributor

Could you evaluate the Spark behavior in case Spark is used on the LHS? What triggered this issue? Is it still required? FYI @phd3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants