Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-10617] [SQL] Fixed AddMonths leap year calculations #8980

Conversation

alexrovner
Copy link

No description provided.

@@ -295,6 +295,8 @@ class DateExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper {
test("add_months") {
checkEvaluation(AddMonths(Literal(Date.valueOf("2015-01-30")), Literal(1)),
DateTimeUtils.fromJavaDate(Date.valueOf("2015-02-28")))
checkEvaluation(AddMonths(Literal(Date.valueOf("2015-02-28")), Literal(12)),
DateTimeUtils.fromJavaDate(Date.valueOf("2016-02-28")))
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not the expected answer, Hive/Oracle will return 2016/02/29

@andrewor14
Copy link
Contributor

@alexrovner actually this PR is opened against the wrong branch. Would you mind closing this and re-opening against the master branch? Once you do that we will start reviewing it.

@SparkQA
Copy link

SparkQA commented Dec 15, 2015

Test build #47746 has finished for PR 8980 at commit 4e64409.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@davies
Copy link
Contributor

davies commented Dec 15, 2015

@alexrovner Could you close this PR since the JIRA had been closed.

@asfgit asfgit closed this in ce5fd40 Dec 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants