LuciferYang commented on code in PR #46457:
URL: https://github.com/apache/spark/pull/46457#discussion_r1593672542


##########
sql/api/src/main/scala/org/apache/spark/sql/catalyst/util/SparkDateTimeUtils.scala:
##########
@@ -197,8 +197,8 @@ trait SparkDateTimeUtils {
     rebaseJulianToGregorianDays(julianDays)
   }
 
-  private val zoneInfoClassName = "sun.util.calendar.ZoneInfo"
-  private val getOffsetsByWallHandle = {
+  private lazy val zoneInfoClassName = "sun.util.calendar.ZoneInfo"

Review Comment:
   Not sure, but: 
   1. Using `TimeZone.getDefault.getOffset(localMillis)`, all tests can pass, 
perhaps the unit test coverage is not comprehensive, but what would be the 
counterexample?
   2. Looking at the inverse function `fromJavaDate` of `toJavaDate`, it does 
not take into account the scenario of `ZoneInfo`



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to