[ 
https://issues.apache.org/jira/browse/SPARK-31986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Wenchen Fan reassigned SPARK-31986:
-----------------------------------

    Assignee: Maxim Gekk

> Test failure RebaseDateTimeSuite."optimization of micros rebasing - Julian to 
> Gregorian"
> ----------------------------------------------------------------------------------------
>
>                 Key: SPARK-31986
>                 URL: https://issues.apache.org/jira/browse/SPARK-31986
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.0.1, 3.1.0
>            Reporter: Maxim Gekk
>            Assignee: Maxim Gekk
>            Priority: Major
>
> The test fails on 1945-09-14 23:30:00.0. The failure can be reproduced by 
> modifying the test:
> {code:scala}
>   test("optimization of micros rebasing - Julian to Gregorian") {
>     outstandingZoneIds.filter(_.getId.contains("Hong"))foreach { zid =>
>       withClue(s"zone id = $zid") {
>         withDefaultTimeZone(zid) {
>           val start = rebaseGregorianToJulianMicros(
>             instantToMicros(LocalDateTime.of(1, 1, 1, 0, 0, 
> 0).atZone(zid).toInstant))
>           val end = rebaseGregorianToJulianMicros(
>             instantToMicros(LocalDateTime.of(2100, 1, 1, 0, 0, 
> 0).atZone(zid).toInstant))
>           var micros = -761211000000000L
>           do {
>             val rebased = rebaseJulianToGregorianMicros(zid, micros)
>             val rebasedAndOptimized = rebaseJulianToGregorianMicros(micros)
>             assert(rebasedAndOptimized === rebased)
>             micros += (MICROS_PER_DAY * 30 * (0.5 + Math.random())).toLong
>           } while (micros <= end)
>         }
>       }
>     }
>   }
> {code}
> {code}
> zone id = Asia/Hong_Kong -761211000000000 did not equal -761207400000000
> ScalaTestFailureLocation: 
> org.apache.spark.sql.catalyst.util.RebaseDateTimeSuite at 
> (RebaseDateTimeSuite.scala:236)
> Expected :-761207400000000
> Actual   :zone id = Asia/Hong_Kong -761211000000000
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to