Github user kiszk commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21505#discussion_r194268734
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
 ---
    @@ -111,6 +113,23 @@ object DateTimeUtils {
         computedTimeZones.computeIfAbsent(timeZoneId, computeTimeZone)
       }
     
    +  private val threadLocalComputedCalendarsMap =
    +    new ThreadLocal[mutable.Map[TimeZone, Calendar]] {
    --- End diff --
    
    Usually, only the default time zone is used. To execute `Cast` regarding 
date is called with a timezone may use another timezone. For the correctness, I 
think that it is necessary to support multiple timezones.
    
    To enable caching for default time zone and to create an instance for other 
time zones would also work correctly.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to