wForget commented on code in PR #5811:
URL: https://github.com/apache/kyuubi/pull/5811#discussion_r1418269274


##########
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/sql/kyuubi/SparkDatasetHelper.scala:
##########
@@ -103,19 +104,20 @@ object SparkDatasetHelper extends Logging {
       timestampAsString: Boolean): DataFrame = {
 
     val quotedCol = (name: String) => col(quoteIfNeeded(name))
+    val tf = getTimeFormatters

Review Comment:
   It may not be thread-safe, so we should try to control its usage scope.
   
   FYI: 
https://github.com/apache/spark/blob/43ca0b929ab3c2f10d1879e5df622195564f8885/sql/api/src/main/scala/org/apache/spark/sql/catalyst/util/DateFormatter.scala#L198
   
   
https://github.com/apache/spark/blob/43ca0b929ab3c2f10d1879e5df622195564f8885/sql/api/src/main/scala/org/apache/spark/sql/catalyst/util/TimestampFormatter.scala#L532



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to