This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 4dde01f  [SPARK-38151][SQL][TESTS] Handle `Pacific/Kanton` in 
DateTimeUtilsSuite
4dde01f is described below

commit 4dde01fc5b0ed44fd6c5ad8da093650931e4dcd4
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Wed Feb 9 13:20:46 2022 -0800

    [SPARK-38151][SQL][TESTS] Handle `Pacific/Kanton` in DateTimeUtilsSuite
    
    ### What changes were proposed in this pull request?
    
    This PR aims to fix the flaky UT failures due to 
https://bugs.openjdk.java.net/browse/JDK-8274407 (`Update Timezone Data to 
2021c`) and its backport commits that renamed 'Pacific/Enderbury' to 
'Pacific/Kanton' in the latest Java `17.0.2`, `11.0.14`, and `8u311`.
    ```
    Rename Pacific/Enderbury to Pacific/Kanton.
    ```
    
    ### Why are the changes needed?
    
    The flaky failures were observed twice in `GitHub Action` environment like 
the following.
    
    **MASTER**
    - 
https://github.com/dongjoon-hyun/spark/runs/5119322349?check_suite_focus=true
    ```
    [info] - daysToMicros and microsToDays *** FAILED *** (620 milliseconds)
    [info]   9131 did not equal 9130 Round trip of 9130 did not work in tz 
Pacific/Kanton (DateTimeUtilsSuite.scala:783)
    ```
    
    **BRANCH-3.2**
    - https://github.com/apache/spark/runs/5122380604?check_suite_focus=true
    ```
    [info] - daysToMicros and microsToDays *** FAILED *** (643 milliseconds)
    [info]   9131 did not equal 9130 Round trip of 9130 did not work in tz 
Pacific/Kanton (DateTimeUtilsSuite.scala:771)
    ```
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Pass the CIs
    
    Closes #35468 from dongjoon-hyun/SPARK-38151.
    
    Authored-by: Dongjoon Hyun <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 .../scala/org/apache/spark/sql/catalyst/util/DateTimeUtilsSuite.scala  | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/DateTimeUtilsSuite.scala
 
b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/DateTimeUtilsSuite.scala
index af0c26e..09a011d 100644
--- 
a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/DateTimeUtilsSuite.scala
+++ 
b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/DateTimeUtilsSuite.scala
@@ -766,12 +766,15 @@ class DateTimeUtilsSuite extends SparkFunSuite with 
Matchers with SQLHelper {
     assert(daysToMicros(16800, UTC) === expected)
 
     // There are some days are skipped entirely in some timezone, skip them 
here.
+    // JDK-8274407 and its backport commits renamed 'Pacific/Enderbury' to 
'Pacific/Kanton'
+    // in Java 8u311, 11.0.14, and 17.0.2
     val skipped_days = Map[String, Set[Int]](
       "Kwajalein" -> Set(8632, 8633, 8634),
       "Pacific/Apia" -> Set(15338),
       "Pacific/Enderbury" -> Set(9130, 9131),
       "Pacific/Fakaofo" -> Set(15338),
       "Pacific/Kiritimati" -> Set(9130, 9131),
+      "Pacific/Kanton" -> Set(9130, 9131),
       "Pacific/Kwajalein" -> Set(8632, 8633, 8634),
       MIT.getId -> Set(15338))
     for (zid <- ALL_TIMEZONES) {

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

Reply via email to