Kelvin Jiang created SPARK-52457:
------------------------------------
Summary: ParseToDate/ParseToTimestamp can return incorrect value
for TimestampNTZ
Key: SPARK-52457
URL: https://issues.apache.org/jira/browse/SPARK-52457
Project: Spark
Issue Type: Bug
Components: SQL
Affects Versions: 3.5.6, 4.0.0
Reporter: Kelvin Jiang
{code:sql}
set spark.sql.session.timeZone = America/Los_Angeles;
select to_timestamp(timestamp_ntz'2000-09-01 01:00:00', '')
{code}
This returns `2000-08-31`, when it should return `2000-09-01`.
This is because `ParseToDate` and `ParseToTimestamp` do not handle
`TimestampNTZ` when creating `GetTimestamp`, which runs into issues when
`GetTimestamp` is evaluated and then casted to date.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]