Github user ueshin commented on the issue:
https://github.com/apache/spark/pull/18664
I don't think Scala/Java Timestamp encoder has the same issue because
`java.sql.Timestamp` always has the timestamp value from `1970-01-01 00:00:00.0
UTC` regardless of timezone as the same as Spark SQL. We can safely roundtrip
the values.
Btw, maybe there are 2 issues here.
The one is what the Arrow data should be and the other is how PySpark
should handle the Arrow data.
As for issue 1, what the Arrow data should be, I believe we should use
session local timezone for the timezone of `ArrowType.Timestamp` type because
Spark SQL is handling the value as if in the timezone.
As for issue 2, how PySpark should handle the Arrow data, as we get the
timestamp value as timezone-aware, we can handle it any ways such as converting
the timezone to system timezone, localizing the timezone to `None` as the tests
are doing, or leaving it as is.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]