[
https://issues.apache.org/jira/browse/SPARK-31986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17135124#comment-17135124
]
Apache Spark commented on SPARK-31986:
--------------------------------------
User 'MaxGekk' has created a pull request for this issue:
https://github.com/apache/spark/pull/28816
> 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
> 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: [email protected]
For additional commands, e-mail: [email protected]