MaxGekk commented on a change in pull request #23391: [SPARK-26456][SQL] Cast
date/timestamp to string by Date/TimestampFormatter
URL: https://github.com/apache/spark/pull/23391#discussion_r397369931
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/HiveResult.scala
##########
@@ -111,11 +115,9 @@ object HiveResult {
toHiveStructString((key, kType)) + ":" + toHiveStructString((value,
vType))
}.toSeq.sorted.mkString("{", ",", "}")
case (null, _) => "NULL"
- case (d: Date, DateType) =>
- DateTimeUtils.dateToString(DateTimeUtils.fromJavaDate(d))
+ case (d: Date, DateType) =>
dateFormatter.format(DateTimeUtils.fromJavaDate(d))
case (t: Timestamp, TimestampType) =>
- val timeZone =
DateTimeUtils.getTimeZone(SQLConf.get.sessionLocalTimeZone)
Review comment:
@juliuszsompolski Thank you for the bug report. I will fix the issue. I
think it is ok to create formatters in place because they can be pulled from
caches.
----------------------------------------------------------------
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]