Github user ueshin commented on a diff in the pull request:
https://github.com/apache/spark/pull/16308#discussion_r97220246
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
@@ -260,6 +264,10 @@ class Dataset[T] private[sql](
case binary: Array[Byte] =>
binary.map("%02X".format(_)).mkString("[", " ", "]")
case array: Array[_] => array.mkString("[", ", ", "]")
case seq: Seq[_] => seq.mkString("[", ", ", "]")
+ case d: Date =>
+ DateTimeUtils.dateToString(DateTimeUtils.fromJavaDate(d))
+ case ts: Timestamp =>
+
DateTimeUtils.timestampToString(DateTimeUtils.fromJavaTimestamp(ts), timeZone)
case _ => cell.toString
--- End diff --
The previous result is generated by the `Date.toString` and
`Timestamp.toString`, which use the timezone from `TimeZone.getDefault()`. We
should use session local timezone here.
---
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]