You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2019/05/21 04:02:29 UTC
[jira] [Updated] (SPARK-16394) Timestamp conversion error in
pyspark.sql.Row because of timezones
[ https://issues.apache.org/jira/browse/SPARK-16394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyukjin Kwon updated SPARK-16394:
---------------------------------
Labels: bulk-closed (was: )
> Timestamp conversion error in pyspark.sql.Row because of timezones
> ------------------------------------------------------------------
>
> Key: SPARK-16394
> URL: https://issues.apache.org/jira/browse/SPARK-16394
> Project: Spark
> Issue Type: Bug
> Components: PySpark
> Affects Versions: 1.6.1
> Reporter: Martin Tapp
> Priority: Minor
> Labels: bulk-closed
>
> We use DataFrame.map to convert each row to a dictionary using Row.asDict(). The problem occurs when a Timestamp column is converted. It seems the Timestamp gets converted to a naive Python datetime. This causes processing errors since all naive datetimes get adjusted to the process' timezone. For instance, a Timestamp with a time of midnight see's it's time bounce based on the local timezone (+/- x hours).
> Current fix is to apply the pytz.utc timezone to each datetime instance.
> Proposed solution is to make all datetime instances aware and use the pytz.utc timezone.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org