MaxGekk commented on a change in pull request #24287: [WIP][SPARK-27357][SQL]
Cast timestamps to/from dates independently from time zones
URL: https://github.com/apache/spark/pull/24287#discussion_r272824041
##########
File path:
sql/core/src/test/resources/sql-tests/results/predicate-functions.sql.out
##########
@@ -263,7 +263,7 @@ select to_date('2017-03-01') = to_timestamp('2017-03-01
00:00:00')
-- !query 32 schema
struct<(CAST(to_date('2017-03-01') AS TIMESTAMP) = to_timestamp('2017-03-01
00:00:00')):boolean>
-- !query 32 output
-true
+false
Review comment:
This could look weird but `'2017-03-01'` is in UTC time zone, `2017-03-01
00:00:00` is parsed in session local time zone (`Los Angeles`). We could point
out the UTC time zone explicitly, for example: `to_timestamp('2017-03-01
00:00:00Z')`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]