Skip to content

Conversation

@MaxGekk
Copy link
Member

@MaxGekk MaxGekk commented Oct 27, 2019

What changes were proposed in this pull request?

The DateTimeUtilsSuite and TimestampFormatterSuite assume constant time difference between timestamp'yesterday', timestamp'today' and timestamp'tomorrow' which is wrong on daylight switching day - day length can be 23 or 25 hours. In the PR, I propose to use Java 8 time API to calculate instances of yesterday and tomorrow timestamps.

Why are the changes needed?

The changes fix test failures and make the tests tolerant to daylight time switching.

Does this PR introduce any user-facing change?

No

How was this patch tested?

By existing test suites DateTimeUtilsSuite and TimestampFormatterSuite.

@MaxGekk MaxGekk changed the title [WIP][SQL][TEST] Fix failures of DateTimeUtilsSuite and TimestampFormatterSuite [SPARK-29614][SQL][TEST] Fix failures of DateTimeUtilsSuite and TimestampFormatterSuite Oct 27, 2019
@MaxGekk MaxGekk changed the title [SPARK-29614][SQL][TEST] Fix failures of DateTimeUtilsSuite and TimestampFormatterSuite [WIP][SPARK-29614][SQL][TEST] Fix failures of DateTimeUtilsSuite and TimestampFormatterSuite Oct 27, 2019
@SparkQA
Copy link

SparkQA commented Oct 27, 2019

Test build #112728 has finished for PR 26273 at commit 139a689.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Oct 27, 2019

Test build #112729 has finished for PR 26273 at commit d7b26b5.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@MaxGekk MaxGekk changed the title [WIP][SPARK-29614][SQL][TEST] Fix failures of DateTimeUtilsSuite and TimestampFormatterSuite [SPARK-29614][SQL][TEST] Fix failures of DateTimeUtilsSuite and TimestampFormatterSuite Oct 27, 2019
@MaxGekk
Copy link
Member Author

MaxGekk commented Oct 27, 2019

ping @dongjoon-hyun @srowen

@SparkQA
Copy link

SparkQA commented Oct 27, 2019

Test build #112733 has finished for PR 26273 at commit 80534aa.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM. Thank you so much for recovering our Jenkins, @MaxGekk and @srowen .
Merged to master.

@gatorsmile
Copy link
Member

Is this only affecting the master branch?

@MaxGekk MaxGekk deleted the midnight-tolerant branch June 5, 2020 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants