MaxGekk opened a new pull request #28816:
URL: https://github.com/apache/spark/pull/28816


   ### What changes were proposed in this pull request?
   TODO
   
   Note: The fix assumes that transitions cannot happen more often than once 
per 2 days.
   
   ### Why are the changes needed?
   Current implementation handles timestamps overlapping only during daylight 
saving time but overlapping can happen also during transition from one standard 
time zone to another one. For example in the case of `Asia/Hong_Kong`, the time 
zone switched from `Japan Standard Time` (UTC+9) to `Hong Kong Time` (UTC+8) on 
_Sunday, 18 November, 1945 01:59:59 AM_. The changes allow to handle the 
special case as well.
   
   ### Does this PR introduce _any_ user-facing change?
   It might affect micros rebasing in before common era when not-optimised 
version of `rebaseJulianToGregorianMicros()` is used directly.
   
   ### How was this patch tested?
   1. By existing tests in `DateTimeUtilsSuite`, `RebaseDateTimeSuite`, 
`DateFunctionsSuite`, `DateExpressionsSuite` and `TimestampFormatterSuite`.
   2. Added new checks to `RebaseDateTimeSuite`.`SPARK-31959: JST -> HKT at 
Asia/Hong_Kong in 1945`.
   3. Regenerated `julian-gregorian-rebase-micros.json` with the step of 30 
minutes, and got the same JSON file. The JSON file isn't affected because 
previously it was generated with the step of 1 week. And the spike in 
diffs/switch points during 1 hour of timestamp overlapping wasn't detected.


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