MaxGekk commented on a change in pull request #28441:
URL: https://github.com/apache/spark/pull/28441#discussion_r419886514



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/RebaseDateTime.scala
##########
@@ -286,6 +286,17 @@ object RebaseDateTime {
    */
   private val gregJulianRebaseMap = 
loadRebaseRecords("gregorian-julian-rebase-micros.json")
 
+  private def getLastSwitchTs(rebaseMap: AnyRefMap[String, RebaseInfo]): Long 
= {
+    val latestTs = rebaseMap.values.map(_.switches.last).max
+    require(rebaseMap.values.forall(_.diffs.last == 0),

Review comment:
       It uses `latestTs` in the error message. I am going to improve the 
message by converting micros to Instant, so, toString should form nicer string:
   ```scala
       require(rebaseMap.values.forall(_.diffs.last == 0),
         s"Differences between Julian and Gregorian calendar after 
${microsToInstant(latestTs)} " +
         "are expected to be zero for available time zones.")
   ```




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



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

Reply via email to